<!DOCTYPE html>
<html data-init="no-js">
<head>
<meta charset="UTF-8" />
<title>丧尸研究专门所 </title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="application-name" content="SugarCube" />
<meta name="version" content="2.37.3" />
<!--

SugarCube (v2.37.3): A free (gratis and libre) story format.

Copyright © 2013–2021 Thomas Michael Edwards <thomasmedwards@gmail.com>.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-->
<script id="script-libraries" type="text/javascript">
if(document.head&&document.addEventListener&&document.querySelector&&Object.create&&Object.freeze&&JSON){document.documentElement.setAttribute("data-init", "loading");
/*! @source http://purl.eligrey.com/github/classList.js/blob/1.2.20171210/classList.js */
"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],s=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},c=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new c("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(e))throw new c("INVALID_CHARACTER_ERR","The token must not contain space characters.");return o.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,s=n.length;s>i;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},u=l[n]=[],h=function(){return new l(this)};if(c[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return~a(this,t+"")},u.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do t=e[n]+"",~a(this,t)||(this.push(t),s=!0);while(++n<i);s&&this._updateClassName()},u.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do for(t=n[i]+"",e=a(this,t);~e;)this.splice(e,1),r=!0,e=a(this,t);while(++i<s);r&&this._updateClassName()},u.toggle=function(t,e){var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},u.replace=function(t,e){var n=a(t+"");~n&&(this.splice(n,1,e),this._updateClassName())},u.toString=function(){return this.join(" ")},s.defineProperty){var f={get:h,enumerable:!0,configurable:!0};try{s.defineProperty(i,e,f)}catch(p){void 0!==p.number&&-2146823252!==p.number||(f.enumerable=!1,s.defineProperty(i,e,f))}}else s[n].__defineGetter__&&i.__defineGetter__(e,h)}}(self),function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;i>n;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(t,e){var n=this.toString().split(" "),i=n.indexOf(t+"");~i&&(n=n.slice(i),this.remove.apply(this,n),this.add(e),this.add.apply(this,n.slice(1)))}),t=null}());
/*!
 * https://github.com/es-shims/es5-shim
 * @license es5-shim Copyright 2009-2020 by contributors, MIT License
 * see https://github.com/es-shims/es5-shim/blob/v4.5.14/LICENSE
 */
(function(t,r){"use strict";if(typeof define==="function"&&define.amd){define(r)}else if(typeof exports==="object"){module.exports=r()}else{t.returnExports=r()}})(this,function(){var t=Array;var r=t.prototype;var e=Object;var n=e.prototype;var i=Function;var a=i.prototype;var o=String;var f=o.prototype;var u=Number;var l=u.prototype;var s=r.slice;var c=r.splice;var v=r.push;var h=r.unshift;var p=r.concat;var y=r.join;var d=a.call;var g=a.apply;var w=Math.max;var b=Math.min;var T=n.toString;var m=typeof Symbol==="function"&&typeof Symbol.toStringTag==="symbol";var D;var S=Function.prototype.toString,x=/^\s*class /,O=function isES6ClassFn(t){try{var r=S.call(t);var e=r.replace(/\/\/.*\n/g,"");var n=e.replace(/\/\*[.\s\S]*\*\//g,"");var i=n.replace(/\n/gm," ").replace(/ {2}/g," ");return x.test(i)}catch(a){return false}},E=function tryFunctionObject(t){try{if(O(t)){return false}S.call(t);return true}catch(r){return false}},j="[object Function]",I="[object GeneratorFunction]",D=function isCallable(t){if(!t){return false}if(typeof t!=="function"&&typeof t!=="object"){return false}if(m){return E(t)}if(O(t)){return false}var r=T.call(t);return r===j||r===I};var M;var U=RegExp.prototype.exec,$=function tryRegexExec(t){try{U.call(t);return true}catch(r){return false}},F="[object RegExp]";M=function isRegex(t){if(typeof t!=="object"){return false}return m?$(t):T.call(t)===F};var N;var C=String.prototype.valueOf,k=function tryStringObject(t){try{C.call(t);return true}catch(r){return false}},A="[object String]";N=function isString(t){if(typeof t==="string"){return true}if(typeof t!=="object"){return false}return m?k(t):T.call(t)===A};var R=e.defineProperty&&function(){try{var t={};e.defineProperty(t,"x",{enumerable:false,value:t});for(var r in t){return false}return t.x===t}catch(n){return false}}();var P=function(t){var r;if(R){r=function(t,r,n,i){if(!i&&r in t){return}e.defineProperty(t,r,{configurable:true,enumerable:false,writable:true,value:n})}}else{r=function(t,r,e,n){if(!n&&r in t){return}t[r]=e}}return function defineProperties(e,n,i){for(var a in n){if(t.call(n,a)){r(e,a,n[a],i)}}}}(n.hasOwnProperty);var J=function isPrimitive(t){var r=typeof t;return t===null||r!=="object"&&r!=="function"};var Y=u.isNaN||function isActualNaN(t){return t!==t};var z={ToInteger:function ToInteger(t){var r=+t;if(Y(r)){r=0}else if(r!==0&&r!==1/0&&r!==-(1/0)){r=(r>0||-1)*Math.floor(Math.abs(r))}return r},ToPrimitive:function ToPrimitive(t){var r,e,n;if(J(t)){return t}e=t.valueOf;if(D(e)){r=e.call(t);if(J(r)){return r}}n=t.toString;if(D(n)){r=n.call(t);if(J(r)){return r}}throw new TypeError},ToObject:function(t){if(t==null){throw new TypeError("can't convert "+t+" to object")}return e(t)},ToUint32:function ToUint32(t){return t>>>0}};var Z=function Empty(){};P(a,{bind:function bind(t){var r=this;if(!D(r)){throw new TypeError("Function.prototype.bind called on incompatible "+r)}var n=s.call(arguments,1);var a;var o=function(){if(this instanceof a){var i=g.call(r,this,p.call(n,s.call(arguments)));if(e(i)===i){return i}return this}else{return g.call(r,t,p.call(n,s.call(arguments)))}};var f=w(0,r.length-n.length);var u=[];for(var l=0;l<f;l++){v.call(u,"$"+l)}a=i("binder","return function ("+y.call(u,",")+"){ return binder.apply(this, arguments); }")(o);if(r.prototype){Z.prototype=r.prototype;a.prototype=new Z;Z.prototype=null}return a}});var G=d.bind(n.hasOwnProperty);var H=d.bind(n.toString);var W=d.bind(s);var B=g.bind(s);if(typeof document==="object"&&document&&document.documentElement){try{W(document.documentElement.childNodes)}catch(X){var L=W;var q=B;W=function arraySliceIE(t){var r=[];var e=t.length;while(e-- >0){r[e]=t[e]}return q(r,L(arguments,1))};B=function arraySliceApplyIE(t,r){return q(W(t),r)}}}var K=d.bind(f.slice);var Q=d.bind(f.split);var V=d.bind(f.indexOf);var _=d.bind(v);var tt=d.bind(n.propertyIsEnumerable);var rt=d.bind(r.sort);var et=t.isArray||function isArray(t){return H(t)==="[object Array]"};var nt=[].unshift(0)!==1;P(r,{unshift:function(){h.apply(this,arguments);return this.length}},nt);P(t,{isArray:et});var it=e("a");var at=it[0]!=="a"||!(0 in it);var ot=function properlyBoxed(t){var r=true;var e=true;var n=false;if(t){try{t.call("foo",function(t,e,n){if(typeof n!=="object"){r=false}});t.call([1],function(){"use strict";e=typeof this==="string"},"x")}catch(i){n=true}}return!!t&&!n&&r&&e};P(r,{forEach:function forEach(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=-1;var i=z.ToUint32(e.length);var a;if(arguments.length>1){a=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.forEach callback must be a function")}while(++n<i){if(n in e){if(typeof a==="undefined"){t(e[n],n,r)}else{t.call(a,e[n],n,r)}}}}},!ot(r.forEach));P(r,{map:function map(r){var e=z.ToObject(this);var n=at&&N(this)?Q(this,""):e;var i=z.ToUint32(n.length);var a=t(i);var o;if(arguments.length>1){o=arguments[1]}if(!D(r)){throw new TypeError("Array.prototype.map callback must be a function")}for(var f=0;f<i;f++){if(f in n){if(typeof o==="undefined"){a[f]=r(n[f],f,e)}else{a[f]=r.call(o,n[f],f,e)}}}return a}},!ot(r.map));P(r,{filter:function filter(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);var i=[];var a;var o;if(arguments.length>1){o=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.filter callback must be a function")}for(var f=0;f<n;f++){if(f in e){a=e[f];if(typeof o==="undefined"?t(a,f,r):t.call(o,a,f,r)){_(i,a)}}}return i}},!ot(r.filter));P(r,{every:function every(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.every callback must be a function")}for(var a=0;a<n;a++){if(a in e&&!(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return false}}return true}},!ot(r.every));P(r,{some:function some(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);var i;if(arguments.length>1){i=arguments[1]}if(!D(t)){throw new TypeError("Array.prototype.some callback must be a function")}for(var a=0;a<n;a++){if(a in e&&(typeof i==="undefined"?t(e[a],a,r):t.call(i,e[a],a,r))){return true}}return false}},!ot(r.some));var ft=false;if(r.reduce){ft=typeof r.reduce.call("es5",function(t,r,e,n){return n})==="object"}P(r,{reduce:function reduce(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduce callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var a;if(arguments.length>=2){a=arguments[1]}else{do{if(i in e){a=e[i++];break}if(++i>=n){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<n;i++){if(i in e){a=t(a,e[i],i,r)}}return a}},!ft);var ut=false;if(r.reduceRight){ut=typeof r.reduceRight.call("es5",function(t,r,e,n){return n})==="object"}P(r,{reduceRight:function reduceRight(t){var r=z.ToObject(this);var e=at&&N(this)?Q(this,""):r;var n=z.ToUint32(e.length);if(!D(t)){throw new TypeError("Array.prototype.reduceRight callback must be a function")}if(n===0&&arguments.length===1){throw new TypeError("reduceRight of empty array with no initial value")}var i;var a=n-1;if(arguments.length>=2){i=arguments[1]}else{do{if(a in e){i=e[a--];break}if(--a<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(a<0){return i}do{if(a in e){i=t(i,e[a],a,r)}}while(a--);return i}},!ut);var lt=r.indexOf&&[0,1].indexOf(1,2)!==-1;P(r,{indexOf:function indexOf(t){var r=at&&N(this)?Q(this,""):z.ToObject(this);var e=z.ToUint32(r.length);if(e===0){return-1}var n=0;if(arguments.length>1){n=z.ToInteger(arguments[1])}n=n>=0?n:w(0,e+n);for(;n<e;n++){if(n in r&&r[n]===t){return n}}return-1}},lt);var st=r.lastIndexOf&&[0,1].lastIndexOf(0,-3)!==-1;P(r,{lastIndexOf:function lastIndexOf(t){var r=at&&N(this)?Q(this,""):z.ToObject(this);var e=z.ToUint32(r.length);if(e===0){return-1}var n=e-1;if(arguments.length>1){n=b(n,z.ToInteger(arguments[1]))}n=n>=0?n:e-Math.abs(n);for(;n>=0;n--){if(n in r&&t===r[n]){return n}}return-1}},st);var ct=function(){var t=[1,2];var r=t.splice();return t.length===2&&et(r)&&r.length===0}();P(r,{splice:function splice(t,r){if(arguments.length===0){return[]}else{return c.apply(this,arguments)}}},!ct);var vt=function(){var t={};r.splice.call(t,0,0,1);return t.length===1}();P(r,{splice:function splice(t,r){if(arguments.length===0){return[]}var e=arguments;this.length=w(z.ToInteger(this.length),0);if(arguments.length>0&&typeof r!=="number"){e=W(arguments);if(e.length<2){_(e,this.length-t)}else{e[1]=z.ToInteger(r)}}return c.apply(this,e)}},!vt);var ht=function(){var r=new t(1e5);r[8]="x";r.splice(1,1);return r.indexOf("x")===7}();var pt=function(){var t=256;var r=[];r[t]="a";r.splice(t+1,0,"b");return r[t]==="a"}();P(r,{splice:function splice(t,r){var e=z.ToObject(this);var n=[];var i=z.ToUint32(e.length);var a=z.ToInteger(t);var f=a<0?w(i+a,0):b(a,i);var u=arguments.length===0?0:arguments.length===1?i-f:b(w(z.ToInteger(r),0),i-f);var l=0;var s;while(l<u){s=o(f+l);if(G(e,s)){n[l]=e[s]}l+=1}var c=W(arguments,2);var v=c.length;var h;if(v<u){l=f;var p=i-u;while(l<p){s=o(l+u);h=o(l+v);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l+=1}l=i;var y=i-u+v;while(l>y){delete e[l-1];l-=1}}else if(v>u){l=i-u;while(l>f){s=o(l+u-1);h=o(l+v-1);if(G(e,s)){e[h]=e[s]}else{delete e[h]}l-=1}}l=f;for(var d=0;d<c.length;++d){e[l]=c[d];l+=1}e.length=i-u+v;return n}},!ht||!pt);var yt=r.join;var dt;try{dt=Array.prototype.join.call("123",",")!=="1,2,3"}catch(X){dt=true}if(dt){P(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return yt.call(N(this)?Q(this,""):this,r)}},dt)}var gt=[1,2].join(undefined)!=="1,2";if(gt){P(r,{join:function join(t){var r=typeof t==="undefined"?",":t;return yt.call(this,r)}},gt)}var wt=function push(t){var r=z.ToObject(this);var e=z.ToUint32(r.length);var n=0;while(n<arguments.length){r[e+n]=arguments[n];n+=1}r.length=e+n;return e+n};var bt=function(){var t={};var r=Array.prototype.push.call(t,undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();P(r,{push:function push(t){if(et(this)){return v.apply(this,arguments)}return wt.apply(this,arguments)}},bt);var Tt=function(){var t=[];var r=t.push(undefined);return r!==1||t.length!==1||typeof t[0]!=="undefined"||!G(t,0)}();P(r,{push:wt},Tt);P(r,{slice:function(t,r){var e=N(this)?Q(this,""):this;return B(e,arguments)}},at);var mt=function(){try{[1,2].sort(null)}catch(t){try{[1,2].sort({})}catch(r){return false}}return true}();var Dt=function(){try{[1,2].sort(/a/);return false}catch(t){}return true}();var St=function(){try{[1,2].sort(undefined);return true}catch(t){}return false}();P(r,{sort:function sort(t){if(typeof t==="undefined"){return rt(this)}if(!D(t)){throw new TypeError("Array.prototype.sort callback must be a function")}return rt(this,t)}},mt||!St||!Dt);var xt=!tt({toString:null},"toString");var Ot=tt(function(){},"prototype");var Et=!G("x","0");var jt=function(t){var r=t.constructor;return r&&r.prototype===t};var It={$applicationCache:true,$console:true,$external:true,$frame:true,$frameElement:true,$frames:true,$innerHeight:true,$innerWidth:true,$onmozfullscreenchange:true,$onmozfullscreenerror:true,$outerHeight:true,$outerWidth:true,$pageXOffset:true,$pageYOffset:true,$parent:true,$scrollLeft:true,$scrollTop:true,$scrollX:true,$scrollY:true,$self:true,$webkitIndexedDB:true,$webkitStorageInfo:true,$window:true,$width:true,$height:true,$top:true,$localStorage:true};var Mt=function(){if(typeof window==="undefined"){return false}for(var t in window){try{if(!It["$"+t]&&G(window,t)&&window[t]!==null&&typeof window[t]==="object"){jt(window[t])}}catch(r){return true}}return false}();var Ut=function(t){if(typeof window==="undefined"||!Mt){return jt(t)}try{return jt(t)}catch(r){return false}};var $t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var Ft=$t.length;var Nt=function isArguments(t){return H(t)==="[object Arguments]"};var Ct=function isArguments(t){return t!==null&&typeof t==="object"&&typeof t.length==="number"&&t.length>=0&&!et(t)&&D(t.callee)};var kt=Nt(arguments)?Nt:Ct;P(e,{keys:function keys(t){var r=D(t);var e=kt(t);var n=t!==null&&typeof t==="object";var i=n&&N(t);if(!n&&!r&&!e){throw new TypeError("Object.keys called on a non-object")}var a=[];var f=Ot&&r;if(i&&Et||e){for(var u=0;u<t.length;++u){_(a,o(u))}}if(!e){for(var l in t){if(!(f&&l==="prototype")&&G(t,l)){_(a,o(l))}}}if(xt){var s=Ut(t);for(var c=0;c<Ft;c++){var v=$t[c];if(!(s&&v==="constructor")&&G(t,v)){_(a,v)}}}return a}});var At=e.keys&&function(){return e.keys(arguments).length===2}(1,2);var Rt=e.keys&&function(){var t=e.keys(arguments);return arguments.length!==1||t.length!==1||t[0]!==1}(1);var Pt=e.keys;P(e,{keys:function keys(t){if(kt(t)){return Pt(W(t))}else{return Pt(t)}}},!At||Rt);var Jt=new Date(-0xc782b5b342b24).getUTCMonth()!==0;var Yt=new Date(-0x55d318d56a724);var zt=new Date(14496624e5);var Zt=Yt.toUTCString()!=="Mon, 01 Jan -45875 11:59:59 GMT";var Gt;var Ht;var Wt=Yt.getTimezoneOffset();if(Wt<-720){Gt=Yt.toDateString()!=="Tue Jan 02 -45875";Ht=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(zt))}else{Gt=Yt.toDateString()!=="Mon Jan 01 -45875";Ht=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-+]\d\d\d\d(?: |$)/.test(String(zt))}var Bt=d.bind(Date.prototype.getFullYear);var Xt=d.bind(Date.prototype.getMonth);var Lt=d.bind(Date.prototype.getDate);var qt=d.bind(Date.prototype.getUTCFullYear);var Kt=d.bind(Date.prototype.getUTCMonth);var Qt=d.bind(Date.prototype.getUTCDate);var Vt=d.bind(Date.prototype.getUTCDay);var _t=d.bind(Date.prototype.getUTCHours);var tr=d.bind(Date.prototype.getUTCMinutes);var rr=d.bind(Date.prototype.getUTCSeconds);var er=d.bind(Date.prototype.getUTCMilliseconds);var nr=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var ir=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var ar=function daysInMonth(t,r){return Lt(new Date(r,t,0))};P(Date.prototype,{getFullYear:function getFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);if(t<0&&Xt(this)>11){return t+1}return t},getMonth:function getMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Xt(this);if(t<0&&r>11){return 0}return r},getDate:function getDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Bt(this);var r=Xt(this);var e=Lt(this);if(t<0&&r>11){if(r===12){return e}var n=ar(0,t+1);return n-e+1}return e},getUTCFullYear:function getUTCFullYear(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=qt(this);if(t<0&&Kt(this)>11){return t+1}return t},getUTCMonth:function getUTCMonth(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=qt(this);var r=Kt(this);if(t<0&&r>11){return 0}return r},getUTCDate:function getUTCDate(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=qt(this);var r=Kt(this);var e=Qt(this);if(t<0&&r>11){if(r===12){return e}var n=ar(0,t+1);return n-e+1}return e}},Jt);P(Date.prototype,{toUTCString:function toUTCString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=Vt(this);var r=Qt(this);var e=Kt(this);var n=qt(this);var i=_t(this);var a=tr(this);var o=rr(this);return nr[t]+", "+(r<10?"0"+r:r)+" "+ir[e]+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"}},Jt||Zt);P(Date.prototype,{toDateString:function toDateString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();return nr[t]+" "+ir[e]+" "+(r<10?"0"+r:r)+" "+n}},Jt||Gt);if(Jt||Ht){Date.prototype.toString=function toString(){if(!this||!(this instanceof Date)){throw new TypeError("this is not a Date object.")}var t=this.getDay();var r=this.getDate();var e=this.getMonth();var n=this.getFullYear();var i=this.getHours();var a=this.getMinutes();var o=this.getSeconds();var f=this.getTimezoneOffset();var u=Math.floor(Math.abs(f)/60);var l=Math.floor(Math.abs(f)%60);return nr[t]+" "+ir[e]+" "+(r<10?"0"+r:r)+" "+n+" "+(i<10?"0"+i:i)+":"+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)+" GMT"+(f>0?"-":"+")+(u<10?"0"+u:u)+(l<10?"0"+l:l)};if(R){e.defineProperty(Date.prototype,"toString",{configurable:true,enumerable:false,writable:true})}}var or=-621987552e5;var fr="-000001";var ur=Date.prototype.toISOString&&new Date(or).toISOString().indexOf(fr)===-1;var lr=Date.prototype.toISOString&&new Date(-1).toISOString()!=="1969-12-31T23:59:59.999Z";var sr=d.bind(Date.prototype.getTime);P(Date.prototype,{toISOString:function toISOString(){if(!isFinite(this)||!isFinite(sr(this))){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}var t=qt(this);var r=Kt(this);t+=Math.floor(r/12);r=(r%12+12)%12;var e=[r+1,Qt(this),_t(this),tr(this),rr(this)];t=(t<0?"-":t>9999?"+":"")+K("00000"+Math.abs(t),0<=t&&t<=9999?-4:-6);for(var n=0;n<e.length;++n){e[n]=K("00"+e[n],-2)}return t+"-"+W(e,0,2).join("-")+"T"+W(e,2).join(":")+"."+K("000"+er(this),-3)+"Z"}},ur||lr);var cr=function(){try{return Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(or).toJSON().indexOf(fr)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(t){return false}}();if(!cr){Date.prototype.toJSON=function toJSON(t){var r=e(this);var n=z.ToPrimitive(r);if(typeof n==="number"&&!isFinite(n)){return null}var i=r.toISOString;if(!D(i)){throw new TypeError("toISOString property is not callable")}return i.call(r)}}var vr=Date.parse("+033658-09-27T01:46:40.000Z")===1e15;var hr=!isNaN(Date.parse("2012-04-04T24:00:00.500Z"))||!isNaN(Date.parse("2012-11-31T23:59:59.000Z"))||!isNaN(Date.parse("2012-12-31T23:59:60.000Z"));var pr=isNaN(Date.parse("2000-01-01T00:00:00.000Z"));if(pr||hr||!vr){var yr=Math.pow(2,31)-1;var dr=Y(new Date(1970,0,1,0,0,0,yr+1).getTime());Date=function(t){var r=function Date(e,n,i,a,f,u,l){var s=arguments.length;var c;if(this instanceof t){var v=u;var h=l;if(dr&&s>=7&&l>yr){var p=Math.floor(l/yr)*yr;var y=Math.floor(p/1e3);v+=y;h-=y*1e3}c=s===1&&o(e)===e?new t(r.parse(e)):s>=7?new t(e,n,i,a,f,v,h):s>=6?new t(e,n,i,a,f,v):s>=5?new t(e,n,i,a,f):s>=4?new t(e,n,i,a):s>=3?new t(e,n,i):s>=2?new t(e,n):s>=1?new t(e instanceof t?+e:e):new t}else{c=t.apply(this,arguments)}if(!J(c)){P(c,{constructor:r},true)}return c};var e=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var n=[0,31,59,90,120,151,181,212,243,273,304,334,365];var i=function dayFromMonth(t,r){var e=r>1?1:0;return n[r]+Math.floor((t-1969+e)/4)-Math.floor((t-1901+e)/100)+Math.floor((t-1601+e)/400)+365*(t-1970)};var a=function toUTC(r){var e=0;var n=r;if(dr&&n>yr){var i=Math.floor(n/yr)*yr;var a=Math.floor(i/1e3);e+=a;n-=a*1e3}return u(new t(1970,0,1,0,0,e,n))};for(var f in t){if(G(t,f)){r[f]=t[f]}}P(r,{now:t.now,UTC:t.UTC},true);r.prototype=t.prototype;P(r.prototype,{constructor:r},true);var l=function parse(r){var n=e.exec(r);if(n){var o=u(n[1]),f=u(n[2]||1)-1,l=u(n[3]||1)-1,s=u(n[4]||0),c=u(n[5]||0),v=u(n[6]||0),h=Math.floor(u(n[7]||0)*1e3),p=Boolean(n[4]&&!n[8]),y=n[9]==="-"?1:-1,d=u(n[10]||0),g=u(n[11]||0),w;var b=c>0||v>0||h>0;if(s<(b?24:25)&&c<60&&v<60&&h<1e3&&f>-1&&f<12&&d<24&&g<60&&l>-1&&l<i(o,f+1)-i(o,f)){w=((i(o,f)+l)*24+s+d*y)*60;w=((w+c+g*y)*60+v)*1e3+h;if(p){w=a(w)}if(-864e13<=w&&w<=864e13){return w}}return NaN}return t.parse.apply(this,arguments)};P(r,{parse:l});return r}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}var gr=l.toFixed&&(8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)!=="1"||1.255.toFixed(2)!=="1.25"||(1000000000000000128).toFixed(0)!=="1000000000000000128");var wr={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function multiply(t,r){var e=-1;var n=r;while(++e<wr.size){n+=t*wr.data[e];wr.data[e]=n%wr.base;n=Math.floor(n/wr.base)}},divide:function divide(t){var r=wr.size;var e=0;while(--r>=0){e+=wr.data[r];wr.data[r]=Math.floor(e/t);e=e%t*wr.base}},numToString:function numToString(){var t=wr.size;var r="";while(--t>=0){if(r!==""||t===0||wr.data[t]!==0){var e=o(wr.data[t]);if(r===""){r=e}else{r+=K("0000000",0,7-e.length)+e}}}return r},pow:function pow(t,r,e){return r===0?e:r%2===1?pow(t,r-1,e*t):pow(t*t,r/2,e)},log:function log(t){var r=0;var e=t;while(e>=4096){r+=12;e/=4096}while(e>=2){r+=1;e/=2}return r}};var br=function toFixed(t){var r,e,n,i,a,f,l,s;r=u(t);r=Y(r)?0:Math.floor(r);if(r<0||r>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}e=u(this);if(Y(e)){return"NaN"}if(e<=-1e21||e>=1e21){return o(e)}n="";if(e<0){n="-";e=-e}i="0";if(e>1e-21){a=wr.log(e*wr.pow(2,69,1))-69;f=a<0?e*wr.pow(2,-a,1):e/wr.pow(2,a,1);f*=4503599627370496;a=52-a;if(a>0){wr.multiply(0,f);l=r;while(l>=7){wr.multiply(1e7,0);l-=7}wr.multiply(wr.pow(10,l,1),0);l=a-1;while(l>=23){wr.divide(1<<23);l-=23}wr.divide(1<<l);wr.multiply(1,1);wr.divide(2);i=wr.numToString()}else{wr.multiply(0,f);wr.multiply(1<<-a,0);i=wr.numToString()+K("0.00000000000000000000",2,2+r)}}if(r>0){s=i.length;if(s<=r){i=n+K("0.0000000000000000000",0,r-s+2)+i}else{i=n+K(i,0,s-r)+"."+K(i,s-r)}}else{i=n+i}return i};P(l,{toFixed:br},gr);var Tr=function(){try{return 1..toPrecision(undefined)==="1"}catch(t){return true}}();var mr=l.toPrecision;P(l,{toPrecision:function toPrecision(t){return typeof t==="undefined"?mr.call(this):mr.call(this,t)}},Tr);if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"test".split(/(?:)/,-1).length!==4||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var t=typeof/()??/.exec("")[1]==="undefined";var r=Math.pow(2,32)-1;f.split=function(e,n){var i=String(this);if(typeof e==="undefined"&&n===0){return[]}if(!M(e)){return Q(this,e,n)}var a=[];var o=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,u,l,s,c;var h=new RegExp(e.source,o+"g");if(!t){u=new RegExp("^"+h.source+"$(?!\\s)",o)}var p=typeof n==="undefined"?r:z.ToUint32(n);l=h.exec(i);while(l){s=l.index+l[0].length;if(s>f){_(a,K(i,f,l.index));if(!t&&l.length>1){l[0].replace(u,function(){for(var t=1;t<arguments.length-2;t++){if(typeof arguments[t]==="undefined"){l[t]=void 0}}})}if(l.length>1&&l.index<i.length){v.apply(a,W(l,1))}c=l[0].length;f=s;if(a.length>=p){break}}if(h.lastIndex===l.index){h.lastIndex++}l=h.exec(i)}if(f===i.length){if(c||!h.test("")){_(a,"")}}else{_(a,K(i,f))}return a.length>p?W(a,0,p):a}})()}else if("0".split(void 0,0).length){f.split=function split(t,r){if(typeof t==="undefined"&&r===0){return[]}return Q(this,t,r)}}var Dr=f.replace;var Sr=function(){var t=[];"x".replace(/x(.)?/g,function(r,e){_(t,e)});return t.length===1&&typeof t[0]==="undefined"}();if(!Sr){f.replace=function replace(t,r){var e=D(r);var n=M(t)&&/\)[*?]/.test(t.source);if(!e||!n){return Dr.call(this,t,r)}else{var i=function(e){var n=arguments.length;var i=t.lastIndex;t.lastIndex=0;var a=t.exec(e)||[];t.lastIndex=i;_(a,arguments[n-2],arguments[n-1]);return r.apply(this,a)};return Dr.call(this,t,i)}}}var xr=f.substr;var Or="".substr&&"0b".substr(-1)!=="b";P(f,{substr:function substr(t,r){var e=t;if(t<0){e=w(this.length+t,0)}return xr.call(this,e,r)}},Or);var Er="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";var jr="\u200b";var Ir="["+Er+"]";var Mr=new RegExp("^"+Ir+Ir+"*");var Ur=new RegExp(Ir+Ir+"*$");var $r=f.trim&&(Er.trim()||!jr.trim());P(f,{trim:function trim(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}return o(this).replace(Mr,"").replace(Ur,"")}},$r);var Fr=d.bind(String.prototype.trim);var Nr=f.lastIndexOf&&"abc\u3042\u3044".lastIndexOf("\u3042\u3044",2)!==-1;P(f,{lastIndexOf:function lastIndexOf(t){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var r=o(this);var e=o(t);var n=arguments.length>1?u(arguments[1]):NaN;var i=Y(n)?Infinity:z.ToInteger(n);var a=b(w(i,0),r.length);var f=e.length;var l=a+f;while(l>0){l=w(0,l-f);var s=V(K(r,l,a+f),e);if(s!==-1){return l+s}}return-1}},Nr);var Cr=f.lastIndexOf;P(f,{lastIndexOf:function lastIndexOf(t){return Cr.apply(this,arguments)}},f.lastIndexOf.length!==1);if(parseInt(Er+"08")!==8||parseInt(Er+"0x16")!==22){parseInt=function(t){var r=/^[-+]?0[xX]/;return function parseInt(e,n){if(typeof e==="symbol"){""+e}var i=Fr(String(e));var a=u(n)||(r.test(i)?16:10);return t(i,a)}}(parseInt)}if(1/parseFloat("-0")!==-Infinity){parseFloat=function(t){return function parseFloat(r){var e=Fr(String(r));var n=t(e);return n===0&&K(e,0,1)==="-"?-0:n}}(parseFloat)}if(String(new RangeError("test"))!=="RangeError: test"){var kr=function toString(){if(typeof this==="undefined"||this===null){throw new TypeError("can't convert "+this+" to object")}var t=this.name;if(typeof t==="undefined"){t="Error"}else if(typeof t!=="string"){t=o(t)}var r=this.message;if(typeof r==="undefined"){r=""}else if(typeof r!=="string"){r=o(r)}if(!t){return r}if(!r){return t}return t+": "+r};Error.prototype.toString=kr}if(R){var Ar=function(t,r){if(tt(t,r)){var e=Object.getOwnPropertyDescriptor(t,r);if(e.configurable){e.enumerable=false;Object.defineProperty(t,r,e)}}};Ar(Error.prototype,"message");if(Error.prototype.message!==""){Error.prototype.message=""}Ar(Error.prototype,"name")}if(String(/a/gim)!=="/a/gim"){var Rr=function toString(){var t="/"+this.source+"/";if(this.global){t+="g"}if(this.ignoreCase){t+="i"}if(this.multiline){t+="m"}return t};RegExp.prototype.toString=Rr}});
/*!
 * https://github.com/paulmillr/es6-shim
 * @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
 *   and contributors,  MIT License
 * es6-shim: v0.35.4
 * see https://github.com/paulmillr/es6-shim/blob/0.35.4/LICENSE
 * Details and documentation:
 * https://github.com/paulmillr/es6-shim/
 */
(function(e,t){if(typeof define==="function"&&define.amd){define(t)}else if(typeof exports==="object"){module.exports=t()}else{e.returnExports=t()}})(this,function(){"use strict";var e=Function.call.bind(Function.apply);var t=Function.call.bind(Function.call);var r=Array.isArray;var n=Object.keys;var o=function notThunker(t){return function notThunk(){return!e(t,this,arguments)}};var i=function(e){try{e();return false}catch(t){return true}};var a=function valueOrFalseIfThrows(e){try{return e()}catch(t){return false}};var u=o(i);var f=function(){return!i(function(){return Object.defineProperty({},"x",{get:function(){}})})};var s=!!Object.defineProperty&&f();var c=function foo(){}.name==="foo";var l=Function.call.bind(Array.prototype.forEach);var p=Function.call.bind(Array.prototype.reduce);var v=Function.call.bind(Array.prototype.filter);var y=Function.call.bind(Array.prototype.some);var h=function(e,t,r,n){if(!n&&t in e){return}if(s){Object.defineProperty(e,t,{configurable:true,enumerable:false,writable:true,value:r})}else{e[t]=r}};var b=function(e,t,r){l(n(t),function(n){var o=t[n];h(e,n,o,!!r)})};var g=Function.call.bind(Object.prototype.toString);var d=typeof/abc/==="function"?function IsCallableSlow(e){return typeof e==="function"&&g(e)==="[object Function]"}:function IsCallableFast(e){return typeof e==="function"};var m={getter:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}Object.defineProperty(e,t,{configurable:true,enumerable:false,get:r})},proxy:function(e,t,r){if(!s){throw new TypeError("getters require true ES5 support")}var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,{configurable:n.configurable,enumerable:n.enumerable,get:function getKey(){return e[t]},set:function setKey(r){e[t]=r}})},redefine:function(e,t,r){if(s){var n=Object.getOwnPropertyDescriptor(e,t);n.value=r;Object.defineProperty(e,t,n)}else{e[t]=r}},defineByDescriptor:function(e,t,r){if(s){Object.defineProperty(e,t,r)}else if("value"in r){e[t]=r.value}},preserveToString:function(e,t){if(t&&d(t.toString)){h(e,"toString",t.toString.bind(t),true)}}};var O=Object.create||function(e,t){var r=function Prototype(){};r.prototype=e;var o=new r;if(typeof t!=="undefined"){n(t).forEach(function(e){m.defineByDescriptor(o,e,t[e])})}return o};var w=function(e,t){if(!Object.setPrototypeOf){return false}return a(function(){var r=function Subclass(t){var r=new e(t);Object.setPrototypeOf(r,Subclass.prototype);return r};Object.setPrototypeOf(r,e);r.prototype=O(e.prototype,{constructor:{value:r}});return t(r)})};var j=function(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var S=j();var T=S.isFinite;var I=Function.call.bind(String.prototype.indexOf);var E=Function.apply.bind(Array.prototype.indexOf);var P=Function.call.bind(Array.prototype.concat);var C=Function.call.bind(String.prototype.slice);var M=Function.call.bind(Array.prototype.push);var x=Function.apply.bind(Array.prototype.push);var N=Function.call.bind(Array.prototype.shift);var A=Math.max;var R=Math.min;var _=Math.floor;var k=Math.abs;var L=Math.exp;var F=Math.log;var D=Math.sqrt;var z=Function.call.bind(Object.prototype.hasOwnProperty);var q;var W=function(){};var G=S.Map;var H=G&&G.prototype["delete"];var V=G&&G.prototype.get;var B=G&&G.prototype.has;var U=G&&G.prototype.set;var $=S.Symbol||{};var J=$.species||"@@species";var X=Number.isNaN||function isNaN(e){return e!==e};var K=Number.isFinite||function isFinite(e){return typeof e==="number"&&T(e)};var Z=d(Math.sign)?Math.sign:function sign(e){var t=Number(e);if(t===0){return t}if(X(t)){return t}return t<0?-1:1};var Y=function log1p(e){var t=Number(e);if(t<-1||X(t)){return NaN}if(t===0||t===Infinity){return t}if(t===-1){return-Infinity}return 1+t-1===0?t:t*(F(1+t)/(1+t-1))};var Q=function isArguments(e){return g(e)==="[object Arguments]"};var ee=function isArguments(e){return e!==null&&typeof e==="object"&&typeof e.length==="number"&&e.length>=0&&g(e)!=="[object Array]"&&g(e.callee)==="[object Function]"};var te=Q(arguments)?Q:ee;var re={primitive:function(e){return e===null||typeof e!=="function"&&typeof e!=="object"},string:function(e){return g(e)==="[object String]"},regex:function(e){return g(e)==="[object RegExp]"},symbol:function(e){return typeof S.Symbol==="function"&&typeof e==="symbol"}};var ne=function overrideNative(e,t,r){var n=e[t];h(e,t,r,true);m.preserveToString(e[t],n)};var oe=typeof $==="function"&&typeof $["for"]==="function"&&re.symbol($());var ie=re.symbol($.iterator)?$.iterator:"_es6-shim iterator_";if(S.Set&&typeof(new S.Set)["@@iterator"]==="function"){ie="@@iterator"}if(!S.Reflect){h(S,"Reflect",{},true)}var ae=S.Reflect;var ue=String;var fe=typeof document==="undefined"||!document?null:document.all;var se=fe==null?function isNullOrUndefined(e){return e==null}:function isNullOrUndefinedAndNotDocumentAll(e){return e==null&&e!==fe};var ce={Call:function Call(t,r){var n=arguments.length>2?arguments[2]:[];if(!ce.IsCallable(t)){throw new TypeError(t+" is not a function")}return e(t,r,n)},RequireObjectCoercible:function(e,t){if(se(e)){throw new TypeError(t||"Cannot call method on "+e)}return e},TypeIsObject:function(e){if(e===void 0||e===null||e===true||e===false){return false}return typeof e==="function"||typeof e==="object"||e===fe},ToObject:function(e,t){return Object(ce.RequireObjectCoercible(e,t))},IsCallable:d,IsConstructor:function(e){return ce.IsCallable(e)},ToInt32:function(e){return ce.ToNumber(e)>>0},ToUint32:function(e){return ce.ToNumber(e)>>>0},ToNumber:function(e){if(g(e)==="[object Symbol]"){throw new TypeError("Cannot convert a Symbol value to a number")}return+e},ToInteger:function(e){var t=ce.ToNumber(e);if(X(t)){return 0}if(t===0||!K(t)){return t}return(t>0?1:-1)*_(k(t))},ToLength:function(e){var t=ce.ToInteger(e);if(t<=0){return 0}if(t>Number.MAX_SAFE_INTEGER){return Number.MAX_SAFE_INTEGER}return t},SameValue:function(e,t){if(e===t){if(e===0){return 1/e===1/t}return true}return X(e)&&X(t)},SameValueZero:function(e,t){return e===t||X(e)&&X(t)},IsIterable:function(e){return ce.TypeIsObject(e)&&(typeof e[ie]!=="undefined"||te(e))},GetIterator:function(e){if(te(e)){return new q(e,"value")}var t=ce.GetMethod(e,ie);if(!ce.IsCallable(t)){throw new TypeError("value is not an iterable")}var r=ce.Call(t,e);if(!ce.TypeIsObject(r)){throw new TypeError("bad iterator")}return r},GetMethod:function(e,t){var r=ce.ToObject(e)[t];if(se(r)){return void 0}if(!ce.IsCallable(r)){throw new TypeError("Method not callable: "+t)}return r},IteratorComplete:function(e){return!!e.done},IteratorClose:function(e,t){var r=ce.GetMethod(e,"return");if(r===void 0){return}var n,o;try{n=ce.Call(r,e)}catch(i){o=i}if(t){return}if(o){throw o}if(!ce.TypeIsObject(n)){throw new TypeError("Iterator's return method returned a non-object.")}},IteratorNext:function(e){var t=arguments.length>1?e.next(arguments[1]):e.next();if(!ce.TypeIsObject(t)){throw new TypeError("bad iterator")}return t},IteratorStep:function(e){var t=ce.IteratorNext(e);var r=ce.IteratorComplete(t);return r?false:t},Construct:function(e,t,r,n){var o=typeof r==="undefined"?e:r;if(!n&&ae.construct){return ae.construct(e,t,o)}var i=o.prototype;if(!ce.TypeIsObject(i)){i=Object.prototype}var a=O(i);var u=ce.Call(e,a,t);return ce.TypeIsObject(u)?u:a},SpeciesConstructor:function(e,t){var r=e.constructor;if(r===void 0){return t}if(!ce.TypeIsObject(r)){throw new TypeError("Bad constructor")}var n=r[J];if(se(n)){return t}if(!ce.IsConstructor(n)){throw new TypeError("Bad @@species")}return n},CreateHTML:function(e,t,r,n){var o=ce.ToString(e);var i="<"+t;if(r!==""){var a=ce.ToString(n);var u=a.replace(/"/g,"&quot;");i+=" "+r+'="'+u+'"'}var f=i+">";var s=f+o;return s+"</"+t+">"},IsRegExp:function IsRegExp(e){if(!ce.TypeIsObject(e)){return false}var t=e[$.match];if(typeof t!=="undefined"){return!!t}return re.regex(e)},ToString:function ToString(e){return ue(e)}};if(s&&oe){var le=function defineWellKnownSymbol(e){if(re.symbol($[e])){return $[e]}var t=$["for"]("Symbol."+e);Object.defineProperty($,e,{configurable:false,enumerable:false,writable:false,value:t});return t};if(!re.symbol($.search)){var pe=le("search");var ve=String.prototype.search;h(RegExp.prototype,pe,function search(e){return ce.Call(ve,e,[this])});var ye=function search(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,pe);if(typeof r!=="undefined"){return ce.Call(r,e,[t])}}return ce.Call(ve,t,[ce.ToString(e)])};ne(String.prototype,"search",ye)}if(!re.symbol($.replace)){var he=le("replace");var be=String.prototype.replace;h(RegExp.prototype,he,function replace(e,t){return ce.Call(be,e,[this,t])});var ge=function replace(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,he);if(typeof n!=="undefined"){return ce.Call(n,e,[r,t])}}return ce.Call(be,r,[ce.ToString(e),t])};ne(String.prototype,"replace",ge)}if(!re.symbol($.split)){var de=le("split");var me=String.prototype.split;h(RegExp.prototype,de,function split(e,t){return ce.Call(me,e,[this,t])});var Oe=function split(e,t){var r=ce.RequireObjectCoercible(this);if(!se(e)){var n=ce.GetMethod(e,de);if(typeof n!=="undefined"){return ce.Call(n,e,[r,t])}}return ce.Call(me,r,[ce.ToString(e),t])};ne(String.prototype,"split",Oe)}var we=re.symbol($.match);var je=we&&function(){var e={};e[$.match]=function(){return 42};return"a".match(e)!==42}();if(!we||je){var Se=le("match");var Te=String.prototype.match;h(RegExp.prototype,Se,function match(e){return ce.Call(Te,e,[this])});var Ie=function match(e){var t=ce.RequireObjectCoercible(this);if(!se(e)){var r=ce.GetMethod(e,Se);if(typeof r!=="undefined"){return ce.Call(r,e,[t])}}return ce.Call(Te,t,[ce.ToString(e)])};ne(String.prototype,"match",Ie)}}var Ee=function wrapConstructor(e,t,r){m.preserveToString(t,e);if(Object.setPrototypeOf){Object.setPrototypeOf(e,t)}if(s){l(Object.getOwnPropertyNames(e),function(n){if(n in W||r[n]){return}m.proxy(e,n,t)})}else{l(Object.keys(e),function(n){if(n in W||r[n]){return}t[n]=e[n]})}t.prototype=e.prototype;m.redefine(e.prototype,"constructor",t)};var Pe=function(){return this};var Ce=function(e){if(s&&!z(e,J)){m.getter(e,J,Pe)}};var Me=function(e,t){var r=t||function iterator(){return this};h(e,ie,r);if(!e[ie]&&re.symbol(ie)){e[ie]=r}};var xe=function createDataProperty(e,t,r){if(s){Object.defineProperty(e,t,{configurable:true,enumerable:true,writable:true,value:r})}else{e[t]=r}};var Ne=function createDataPropertyOrThrow(e,t,r){xe(e,t,r);if(!ce.SameValue(e[t],r)){throw new TypeError("property is nonconfigurable")}};var Ae=function(e,t,r,n){if(!ce.TypeIsObject(e)){throw new TypeError("Constructor requires `new`: "+t.name)}var o=t.prototype;if(!ce.TypeIsObject(o)){o=r}var i=O(o);for(var a in n){if(z(n,a)){var u=n[a];h(i,a,u,true)}}return i};if(String.fromCodePoint&&String.fromCodePoint.length!==1){var Re=String.fromCodePoint;ne(String,"fromCodePoint",function fromCodePoint(e){return ce.Call(Re,this,arguments)})}var _e={fromCodePoint:function fromCodePoint(e){var t=[];var r;for(var n=0,o=arguments.length;n<o;n++){r=Number(arguments[n]);if(!ce.SameValue(r,ce.ToInteger(r))||r<0||r>1114111){throw new RangeError("Invalid code point "+r)}if(r<65536){M(t,String.fromCharCode(r))}else{r-=65536;M(t,String.fromCharCode((r>>10)+55296));M(t,String.fromCharCode(r%1024+56320))}}return t.join("")},raw:function raw(e){var t=ce.ToObject(e,"bad callSite");var r=ce.ToObject(t.raw,"bad raw value");var n=r.length;var o=ce.ToLength(n);if(o<=0){return""}var i=[];var a=0;var u,f,s,c;while(a<o){u=ce.ToString(a);s=ce.ToString(r[u]);M(i,s);if(a+1>=o){break}f=a+1<arguments.length?arguments[a+1]:"";c=ce.ToString(f);M(i,c);a+=1}return i.join("")}};if(String.raw&&String.raw({raw:{0:"x",1:"y",length:2}})!=="xy"){ne(String,"raw",_e.raw)}b(String,_e);var ke=function repeat(e,t){if(t<1){return""}if(t%2){return repeat(e,t-1)+e}var r=repeat(e,t/2);return r+r};var Le=Infinity;var Fe={repeat:function repeat(e){var t=ce.ToString(ce.RequireObjectCoercible(this));var r=ce.ToInteger(e);if(r<0||r>=Le){throw new RangeError("repeat count must be less than infinity and not overflow maximum string size")}return ke(t,r)},startsWith:function startsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e)){throw new TypeError('Cannot call method "startsWith" with a regex')}var r=ce.ToString(e);var n;if(arguments.length>1){n=arguments[1]}var o=A(ce.ToInteger(n),0);return C(t,o,o+r.length)===r},endsWith:function endsWith(e){var t=ce.ToString(ce.RequireObjectCoercible(this));if(ce.IsRegExp(e)){throw new TypeError('Cannot call method "endsWith" with a regex')}var r=ce.ToString(e);var n=t.length;var o;if(arguments.length>1){o=arguments[1]}var i=typeof o==="undefined"?n:ce.ToInteger(o);var a=R(A(i,0),n);return C(t,a-r.length,a)===r},includes:function includes(e){if(ce.IsRegExp(e)){throw new TypeError('"includes" does not accept a RegExp')}var t=ce.ToString(e);var r;if(arguments.length>1){r=arguments[1]}return I(this,t,r)!==-1},codePointAt:function codePointAt(e){var t=ce.ToString(ce.RequireObjectCoercible(this));var r=ce.ToInteger(e);var n=t.length;if(r>=0&&r<n){var o=t.charCodeAt(r);var i=r+1===n;if(o<55296||o>56319||i){return o}var a=t.charCodeAt(r+1);if(a<56320||a>57343){return o}return(o-55296)*1024+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",Infinity)!==false){ne(String.prototype,"includes",Fe.includes)}if(String.prototype.startsWith&&String.prototype.endsWith){var De=i(function(){return"/a/".startsWith(/a/)});var ze=a(function(){return"abc".startsWith("a",Infinity)===false});if(!De||!ze){ne(String.prototype,"startsWith",Fe.startsWith);ne(String.prototype,"endsWith",Fe.endsWith)}}if(oe){var qe=a(function(){var e=/a/;e[$.match]=false;return"/a/".startsWith(e)});if(!qe){ne(String.prototype,"startsWith",Fe.startsWith)}var We=a(function(){var e=/a/;e[$.match]=false;return"/a/".endsWith(e)});if(!We){ne(String.prototype,"endsWith",Fe.endsWith)}var Ge=a(function(){var e=/a/;e[$.match]=false;return"/a/".includes(e)});if(!Ge){ne(String.prototype,"includes",Fe.includes)}}b(String.prototype,Fe);var He=["\t\n\x0B\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003","\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028","\u2029\ufeff"].join("");var Ve=new RegExp("(^["+He+"]+)|(["+He+"]+$)","g");var Be=function trim(){return ce.ToString(ce.RequireObjectCoercible(this)).replace(Ve,"")};var Ue=["\x85","\u200b","\ufffe"].join("");var $e=new RegExp("["+Ue+"]","g");var Je=/^[-+]0x[0-9a-f]+$/i;var Xe=Ue.trim().length!==Ue.length;h(String.prototype,"trim",Be,Xe);var Ke=function(e){return{value:e,done:arguments.length===0}};var Ze=function(e){ce.RequireObjectCoercible(e);this._s=ce.ToString(e);this._i=0};Ze.prototype.next=function(){var e=this._s;var t=this._i;if(typeof e==="undefined"||t>=e.length){this._s=void 0;return Ke()}var r=e.charCodeAt(t);var n,o;if(r<55296||r>56319||t+1===e.length){o=1}else{n=e.charCodeAt(t+1);o=n<56320||n>57343?1:2}this._i=t+o;return Ke(e.substr(t,o))};Me(Ze.prototype);Me(String.prototype,function(){return new Ze(this)});var Ye={from:function from(e){var r=this;var n;if(arguments.length>1){n=arguments[1]}var o,i;if(typeof n==="undefined"){o=false}else{if(!ce.IsCallable(n)){throw new TypeError("Array.from: when provided, the second argument must be a function")}if(arguments.length>2){i=arguments[2]}o=true}var a=typeof(te(e)||ce.GetMethod(e,ie))!=="undefined";var u,f,s;if(a){f=ce.IsConstructor(r)?Object(new r):[];var c=ce.GetIterator(e);var l,p;s=0;while(true){l=ce.IteratorStep(c);if(l===false){break}p=l.value;try{if(o){p=typeof i==="undefined"?n(p,s):t(n,i,p,s)}f[s]=p}catch(v){ce.IteratorClose(c,true);throw v}s+=1}u=s}else{var y=ce.ToObject(e);u=ce.ToLength(y.length);f=ce.IsConstructor(r)?Object(new r(u)):new Array(u);var h;for(s=0;s<u;++s){h=y[s];if(o){h=typeof i==="undefined"?n(h,s):t(n,i,h,s)}Ne(f,s,h)}}f.length=u;return f},of:function of(){var e=arguments.length;var t=this;var n=r(t)||!ce.IsCallable(t)?new Array(e):ce.Construct(t,[e]);for(var o=0;o<e;++o){Ne(n,o,arguments[o])}n.length=e;return n}};b(Array,Ye);Ce(Array);q=function(e,t){this.i=0;this.array=e;this.kind=t};b(q.prototype,{next:function(){var e=this.i;var t=this.array;if(!(this instanceof q)){throw new TypeError("Not an ArrayIterator")}if(typeof t!=="undefined"){var r=ce.ToLength(t.length);for(;e<r;e++){var n=this.kind;var o;if(n==="key"){o=e}else if(n==="value"){o=t[e]}else if(n==="entry"){o=[e,t[e]]}this.i=e+1;return Ke(o)}}this.array=void 0;return Ke()}});Me(q.prototype);var Qe=Array.of===Ye.of||function(){var e=function Foo(e){this.length=e};e.prototype=[];var t=Array.of.apply(e,[1,2]);return t instanceof e&&t.length===2}();if(!Qe){ne(Array,"of",Ye.of)}var et={copyWithin:function copyWithin(e,t){var r=ce.ToObject(this);var n=ce.ToLength(r.length);var o=ce.ToInteger(e);var i=ce.ToInteger(t);var a=o<0?A(n+o,0):R(o,n);var u=i<0?A(n+i,0):R(i,n);var f;if(arguments.length>2){f=arguments[2]}var s=typeof f==="undefined"?n:ce.ToInteger(f);var c=s<0?A(n+s,0):R(s,n);var l=R(c-u,n-a);var p=1;if(u<a&&a<u+l){p=-1;u+=l-1;a+=l-1}while(l>0){if(u in r){r[a]=r[u]}else{delete r[a]}u+=p;a+=p;l-=1}return r},fill:function fill(e){var t;if(arguments.length>1){t=arguments[1]}var r;if(arguments.length>2){r=arguments[2]}var n=ce.ToObject(this);var o=ce.ToLength(n.length);t=ce.ToInteger(typeof t==="undefined"?0:t);r=ce.ToInteger(typeof r==="undefined"?o:r);var i=t<0?A(o+t,0):R(t,o);var a=r<0?o+r:r;for(var u=i;u<o&&u<a;++u){n[u]=e}return n},find:function find(e){var r=ce.ToObject(this);var n=ce.ToLength(r.length);if(!ce.IsCallable(e)){throw new TypeError("Array#find: predicate must be a function")}var o=arguments.length>1?arguments[1]:null;for(var i=0,a;i<n;i++){a=r[i];if(o){if(t(e,o,a,i,r)){return a}}else if(e(a,i,r)){return a}}},findIndex:function findIndex(e){var r=ce.ToObject(this);var n=ce.ToLength(r.length);if(!ce.IsCallable(e)){throw new TypeError("Array#findIndex: predicate must be a function")}var o=arguments.length>1?arguments[1]:null;for(var i=0;i<n;i++){if(o){if(t(e,o,r[i],i,r)){return i}}else if(e(r[i],i,r)){return i}}return-1},keys:function keys(){return new q(this,"key")},values:function values(){return new q(this,"value")},entries:function entries(){return new q(this,"entry")}};if(Array.prototype.keys&&!ce.IsCallable([1].keys().next)){delete Array.prototype.keys}if(Array.prototype.entries&&!ce.IsCallable([1].entries().next)){delete Array.prototype.entries}if(Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[ie]){b(Array.prototype,{values:Array.prototype[ie]});if(re.symbol($.unscopables)){Array.prototype[$.unscopables].values=true}}if(c&&Array.prototype.values&&Array.prototype.values.name!=="values"){var tt=Array.prototype.values;ne(Array.prototype,"values",function values(){return ce.Call(tt,this,arguments)});h(Array.prototype,ie,Array.prototype.values,true)}b(Array.prototype,et);if(1/[true].indexOf(true,-0)<0){h(Array.prototype,"indexOf",function indexOf(e){var t=E(this,arguments);if(t===0&&1/t<0){return 0}return t},true)}Me(Array.prototype,function(){return this.values()});if(Object.getPrototypeOf){Me(Object.getPrototypeOf([].values()))}var rt=function(){return a(function(){return Array.from({length:-1}).length===0})}();var nt=function(){var e=Array.from([0].entries());return e.length===1&&r(e[0])&&e[0][0]===0&&e[0][1]===0}();if(!rt||!nt){ne(Array,"from",Ye.from)}var ot=function(){return a(function(){return Array.from([0],void 0)})}();if(!ot){var it=Array.from;ne(Array,"from",function from(e){if(arguments.length>1&&typeof arguments[1]!=="undefined"){return ce.Call(it,this,arguments)}else{return t(it,this,e)}})}var at=-(Math.pow(2,32)-1);var ut=function(e,r){var n={length:at};n[r?(n.length>>>0)-1:0]=true;return a(function(){t(e,n,function(){throw new RangeError("should not reach here")},[]);return true})};if(!ut(Array.prototype.forEach)){var ft=Array.prototype.forEach;ne(Array.prototype,"forEach",function forEach(e){return ce.Call(ft,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.map)){var st=Array.prototype.map;ne(Array.prototype,"map",function map(e){return ce.Call(st,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.filter)){var ct=Array.prototype.filter;ne(Array.prototype,"filter",function filter(e){return ce.Call(ct,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.some)){var lt=Array.prototype.some;ne(Array.prototype,"some",function some(e){return ce.Call(lt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.every)){var pt=Array.prototype.every;ne(Array.prototype,"every",function every(e){return ce.Call(pt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.reduce)){var vt=Array.prototype.reduce;ne(Array.prototype,"reduce",function reduce(e){return ce.Call(vt,this.length>=0?this:[],arguments)},true)}if(!ut(Array.prototype.reduceRight,true)){var yt=Array.prototype.reduceRight;ne(Array.prototype,"reduceRight",function reduceRight(e){return ce.Call(yt,this.length>=0?this:[],arguments)},true)}var ht=Number("0o10")!==8;var bt=Number("0b10")!==2;var gt=y(Ue,function(e){return Number(e+0+e)===0});if(ht||bt||gt){var dt=Number;var mt=/^0b[01]+$/i;var Ot=/^0o[0-7]+$/i;var wt=mt.test.bind(mt);var jt=Ot.test.bind(Ot);var St=function(e){var t;if(typeof e.valueOf==="function"){t=e.valueOf();if(re.primitive(t)){return t}}if(typeof e.toString==="function"){t=e.toString();if(re.primitive(t)){return t}}throw new TypeError("No default value")};var Tt=$e.test.bind($e);var It=Je.test.bind(Je);var Et=function(){var e=function Number(t){var r;if(arguments.length>0){r=re.primitive(t)?t:St(t,"number")}else{r=0}if(typeof r==="string"){r=ce.Call(Be,r);if(wt(r)){r=parseInt(C(r,2),2)}else if(jt(r)){r=parseInt(C(r,2),8)}else if(Tt(r)||It(r)){r=NaN}}var n=this;var o=a(function(){dt.prototype.valueOf.call(n);return true});if(n instanceof e&&!o){return new dt(r)}return dt(r)};return e}();Ee(dt,Et,{});b(Et,{NaN:dt.NaN,MAX_VALUE:dt.MAX_VALUE,MIN_VALUE:dt.MIN_VALUE,NEGATIVE_INFINITY:dt.NEGATIVE_INFINITY,POSITIVE_INFINITY:dt.POSITIVE_INFINITY});Number=Et;m.redefine(S,"Number",Et)}var Pt=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Pt,MIN_SAFE_INTEGER:-Pt,EPSILON:2.220446049250313e-16,parseInt:S.parseInt,parseFloat:S.parseFloat,isFinite:K,isInteger:function isInteger(e){return K(e)&&ce.ToInteger(e)===e},isSafeInteger:function isSafeInteger(e){return Number.isInteger(e)&&k(e)<=Number.MAX_SAFE_INTEGER},isNaN:X});h(Number,"parseInt",S.parseInt,Number.parseInt!==S.parseInt);if([,1].find(function(){return true})===1){ne(Array.prototype,"find",et.find)}if([,1].findIndex(function(){return true})!==0){ne(Array.prototype,"findIndex",et.findIndex)}var Ct=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable);var Mt=function ensureEnumerable(e,t){if(s&&Ct(e,t)){Object.defineProperty(e,t,{enumerable:false})}};var xt=function sliceArgs(){var e=Number(this);var t=arguments.length;var r=t-e;var n=new Array(r<0?0:r);for(var o=e;o<t;++o){n[o-e]=arguments[o]}return n};var Nt=function assignTo(e){return function assignToSource(t,r){t[r]=e[r];return t}};var At=function(e,t){var r=n(Object(t));var o;if(ce.IsCallable(Object.getOwnPropertySymbols)){o=v(Object.getOwnPropertySymbols(Object(t)),Ct(t))}return p(P(r,o||[]),Nt(t),e)};var Rt={assign:function(e,t){var r=ce.ToObject(e,"Cannot convert undefined or null to object");return p(ce.Call(xt,1,arguments),At,r)},is:function is(e,t){return ce.SameValue(e,t)}};var _t=Object.assign&&Object.preventExtensions&&function(){var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return e[1]==="y"}}();if(_t){ne(Object,"assign",Rt.assign)}b(Object,Rt);if(s){var kt={setPrototypeOf:function(e,r){var n;var o=function(e,t){if(!ce.TypeIsObject(e)){throw new TypeError("cannot set prototype on a non-object")}if(!(t===null||ce.TypeIsObject(t))){throw new TypeError("can only set prototype to an object or null"+t)}};var i=function(e,r){o(e,r);t(n,e,r);return e};try{n=e.getOwnPropertyDescriptor(e.prototype,r).set;t(n,{},null)}catch(a){if(e.prototype!=={}[r]){return}n=function(e){this[r]=e};i.polyfill=i(i({},null),e.prototype)instanceof e}return i}(Object,"__proto__")};b(Object,kt)}if(Object.setPrototypeOf&&Object.getPrototypeOf&&Object.getPrototypeOf(Object.setPrototypeOf({},null))!==null&&Object.getPrototypeOf(Object.create(null))===null){(function(){var e=Object.create(null);var t=Object.getPrototypeOf;var r=Object.setPrototypeOf;Object.getPrototypeOf=function(r){var n=t(r);return n===e?null:n};Object.setPrototypeOf=function(t,n){var o=n===null?e:n;return r(t,o)};Object.setPrototypeOf.polyfill=false})()}var Lt=!i(function(){return Object.keys("foo")});if(!Lt){var Ft=Object.keys;ne(Object,"keys",function keys(e){return Ft(ce.ToObject(e))});n=Object.keys}var Dt=i(function(){return Object.keys(/a/g)});if(Dt){var zt=Object.keys;ne(Object,"keys",function keys(e){if(re.regex(e)){var t=[];for(var r in e){if(z(e,r)){M(t,r)}}return t}return zt(e)});n=Object.keys}if(Object.getOwnPropertyNames){var qt=!i(function(){return Object.getOwnPropertyNames("foo")});if(!qt){var Wt=typeof window==="object"?Object.getOwnPropertyNames(window):[];var Gt=Object.getOwnPropertyNames;ne(Object,"getOwnPropertyNames",function getOwnPropertyNames(e){var t=ce.ToObject(e);if(g(t)==="[object Window]"){try{return Gt(t)}catch(r){return P([],Wt)}}return Gt(t)})}}if(Object.getOwnPropertyDescriptor){var Ht=!i(function(){return Object.getOwnPropertyDescriptor("foo","bar")});if(!Ht){var Vt=Object.getOwnPropertyDescriptor;ne(Object,"getOwnPropertyDescriptor",function getOwnPropertyDescriptor(e,t){return Vt(ce.ToObject(e),t)})}}if(Object.seal){var Bt=!i(function(){return Object.seal("foo")});if(!Bt){var Ut=Object.seal;ne(Object,"seal",function seal(e){if(!ce.TypeIsObject(e)){return e}return Ut(e)})}}if(Object.isSealed){var $t=!i(function(){return Object.isSealed("foo")});if(!$t){var Jt=Object.isSealed;ne(Object,"isSealed",function isSealed(e){if(!ce.TypeIsObject(e)){return true}return Jt(e)})}}if(Object.freeze){var Xt=!i(function(){return Object.freeze("foo")});if(!Xt){var Kt=Object.freeze;ne(Object,"freeze",function freeze(e){if(!ce.TypeIsObject(e)){return e}return Kt(e)})}}if(Object.isFrozen){var Zt=!i(function(){return Object.isFrozen("foo")});if(!Zt){var Yt=Object.isFrozen;ne(Object,"isFrozen",function isFrozen(e){if(!ce.TypeIsObject(e)){return true}return Yt(e)})}}if(Object.preventExtensions){var Qt=!i(function(){return Object.preventExtensions("foo")});if(!Qt){var er=Object.preventExtensions;ne(Object,"preventExtensions",function preventExtensions(e){if(!ce.TypeIsObject(e)){return e}return er(e)})}}if(Object.isExtensible){var tr=!i(function(){return Object.isExtensible("foo")});if(!tr){var rr=Object.isExtensible;ne(Object,"isExtensible",function isExtensible(e){if(!ce.TypeIsObject(e)){return false}return rr(e)})}}if(Object.getPrototypeOf){var nr=!i(function(){return Object.getPrototypeOf("foo")});if(!nr){var or=Object.getPrototypeOf;ne(Object,"getPrototypeOf",function getPrototypeOf(e){return or(ce.ToObject(e))})}}var ir=s&&function(){var e=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags");return e&&ce.IsCallable(e.get)}();if(s&&!ir){var ar=function flags(){if(!ce.TypeIsObject(this)){throw new TypeError("Method called on incompatible type: must be an object.")}var e="";if(this.global){e+="g"}if(this.ignoreCase){e+="i"}if(this.multiline){e+="m"}if(this.unicode){e+="u"}if(this.sticky){e+="y"}return e};m.getter(RegExp.prototype,"flags",ar)}var ur=s&&a(function(){return String(new RegExp(/a/g,"i"))==="/a/i"});var fr=oe&&s&&function(){var e=/./;e[$.match]=false;return RegExp(e)===e}();var sr=a(function(){return RegExp.prototype.toString.call({source:"abc"})==="/abc/"});var cr=sr&&a(function(){return RegExp.prototype.toString.call({source:"a",flags:"b"})==="/a/b"});if(!sr||!cr){var lr=RegExp.prototype.toString;h(RegExp.prototype,"toString",function toString(){var e=ce.RequireObjectCoercible(this);if(re.regex(e)){return t(lr,e)}var r=ue(e.source);var n=ue(e.flags);return"/"+r+"/"+n},true);m.preserveToString(RegExp.prototype.toString,lr)}if(s&&(!ur||fr)){var pr=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags").get;var vr=Object.getOwnPropertyDescriptor(RegExp.prototype,"source")||{};var yr=function(){return this.source};var hr=ce.IsCallable(vr.get)?vr.get:yr;var br=RegExp;var gr=function(){return function RegExp(e,t){var r=ce.IsRegExp(e);var n=this instanceof RegExp;if(!n&&r&&typeof t==="undefined"&&e.constructor===RegExp){return e}var o=e;var i=t;if(re.regex(e)){o=ce.Call(hr,e);i=typeof t==="undefined"?ce.Call(pr,e):t;return new RegExp(o,i)}else if(r){o=e.source;i=typeof t==="undefined"?e.flags:t}return new br(e,t)}}();Ee(br,gr,{$input:true});RegExp=gr;m.redefine(S,"RegExp",gr)}if(s){var dr={input:"$_",lastMatch:"$&",lastParen:"$+",leftContext:"$`",rightContext:"$'"};l(n(dr),function(e){if(e in RegExp&&!(dr[e]in RegExp)){m.getter(RegExp,dr[e],function get(){return RegExp[e]})}})}Ce(RegExp);var mr=1/Number.EPSILON;var Or=function roundTiesToEven(e){return e+mr-mr};var wr=Math.pow(2,-23);var jr=Math.pow(2,127)*(2-wr);var Sr=Math.pow(2,-126);var Tr=Math.E;var Ir=Math.LOG2E;var Er=Math.LOG10E;var Pr=Number.prototype.clz;delete Number.prototype.clz;var Cr={acosh:function acosh(e){var t=Number(e);if(X(t)||e<1){return NaN}if(t===1){return 0}if(t===Infinity){return t}var r=1/(t*t);if(t<2){return Y(t-1+D(1-r)*t)}var n=t/2;return Y(n+D(1-r)*n-1)+1/Ir},asinh:function asinh(e){var t=Number(e);if(t===0||!T(t)){return t}var r=k(t);var n=r*r;var o=Z(t);if(r<1){return o*Y(r+n/(D(n+1)+1))}return o*(Y(r/2+D(1+1/n)*r/2-1)+1/Ir)},atanh:function atanh(e){var t=Number(e);if(t===0){return t}if(t===-1){return-Infinity}if(t===1){return Infinity}if(X(t)||t<-1||t>1){return NaN}var r=k(t);return Z(t)*Y(2*r/(1-r))/2},cbrt:function cbrt(e){var t=Number(e);if(t===0){return t}var r=t<0;var n;if(r){t=-t}if(t===Infinity){n=Infinity}else{n=L(F(t)/3);n=(t/(n*n)+2*n)/3}return r?-n:n},clz32:function clz32(e){var t=Number(e);var r=ce.ToUint32(t);if(r===0){return 32}return Pr?ce.Call(Pr,r):31-_(F(r+.5)*Ir)},cosh:function cosh(e){var t=Number(e);if(t===0){return 1}if(X(t)){return NaN}if(!T(t)){return Infinity}var r=L(k(t)-1);return(r+1/(r*Tr*Tr))*(Tr/2)},expm1:function expm1(e){var t=Number(e);if(t===-Infinity){return-1}if(!T(t)||t===0){return t}if(k(t)>.5){return L(t)-1}var r=t;var n=0;var o=1;while(n+r!==n){n+=r;o+=1;r*=t/o}return n},hypot:function hypot(e,t){var r=0;var n=0;for(var o=0;o<arguments.length;++o){var i=k(Number(arguments[o]));if(n<i){r*=n/i*(n/i);r+=1;n=i}else{r+=i>0?i/n*(i/n):i}}return n===Infinity?Infinity:n*D(r)},log2:function log2(e){return F(e)*Ir},log10:function log10(e){return F(e)*Er},log1p:Y,sign:Z,sinh:function sinh(e){var t=Number(e);if(!T(t)||t===0){return t}var r=k(t);if(r<1){var n=Math.expm1(r);return Z(t)*n*(1+1/(n+1))/2}var o=L(r-1);return Z(t)*(o-1/(o*Tr*Tr))*(Tr/2)},tanh:function tanh(e){var t=Number(e);if(X(t)||t===0){return t}if(t>=20){return 1}if(t<=-20){return-1}return(Math.expm1(t)-Math.expm1(-t))/(L(t)+L(-t))},trunc:function trunc(e){var t=Number(e);return t<0?-_(-t):_(t)},imul:function imul(e,t){var r=ce.ToUint32(e);var n=ce.ToUint32(t);var o=r>>>16&65535;var i=r&65535;var a=n>>>16&65535;var u=n&65535;return i*u+(o*u+i*a<<16>>>0)|0},fround:function fround(e){var t=Number(e);if(t===0||t===Infinity||t===-Infinity||X(t)){return t}var r=Z(t);var n=k(t);if(n<Sr){return r*Or(n/Sr/wr)*Sr*wr}var o=(1+wr/Number.EPSILON)*n;var i=o-(o-n);if(i>jr||X(i)){return r*Infinity}return r*i}};var Mr=function withinULPDistance(e,t,r){return k(1-e/t)/Number.EPSILON<(r||8)};b(Math,Cr);h(Math,"sinh",Cr.sinh,Math.sinh(710)===Infinity);h(Math,"cosh",Cr.cosh,Math.cosh(710)===Infinity);h(Math,"log1p",Cr.log1p,Math.log1p(-1e-17)!==-1e-17);h(Math,"asinh",Cr.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7));h(Math,"asinh",Cr.asinh,Math.asinh(1e300)===Infinity);h(Math,"atanh",Cr.atanh,Math.atanh(1e-300)===0);h(Math,"tanh",Cr.tanh,Math.tanh(-2e-17)!==-2e-17);
h(Math,"acosh",Cr.acosh,Math.acosh(Number.MAX_VALUE)===Infinity);h(Math,"acosh",Cr.acosh,!Mr(Math.acosh(1+Number.EPSILON),Math.sqrt(2*Number.EPSILON)));h(Math,"cbrt",Cr.cbrt,!Mr(Math.cbrt(1e-300),1e-100));h(Math,"sinh",Cr.sinh,Math.sinh(-2e-17)!==-2e-17);var xr=Math.expm1(10);h(Math,"expm1",Cr.expm1,xr>22025.465794806718||xr<22025.465794806718);var Nr=Math.round;var Ar=Math.round(.5-Number.EPSILON/4)===0&&Math.round(-.5+Number.EPSILON/3.99)===1;var Rr=mr+1;var _r=2*mr-1;var kr=[Rr,_r].every(function(e){return Math.round(e)===e});h(Math,"round",function round(e){var t=_(e);var r=t===-1?-0:t+1;return e-t<.5?t:r},!Ar||!kr);m.preserveToString(Math.round,Nr);var Lr=Math.imul;if(Math.imul(4294967295,5)!==-5){Math.imul=Cr.imul;m.preserveToString(Math.imul,Lr)}if(Math.imul.length!==2){ne(Math,"imul",function imul(e,t){return ce.Call(Lr,Math,arguments)})}var Fr=function(){var e=S.setTimeout;if(typeof e!=="function"&&typeof e!=="object"){return}ce.IsPromise=function(e){if(!ce.TypeIsObject(e)){return false}if(typeof e._promise==="undefined"){return false}return true};var r=function(e){if(!ce.IsConstructor(e)){throw new TypeError("Bad promise constructor")}var t=this;var r=function(e,r){if(t.resolve!==void 0||t.reject!==void 0){throw new TypeError("Bad Promise implementation!")}t.resolve=e;t.reject=r};t.resolve=void 0;t.reject=void 0;t.promise=new e(r);if(!(ce.IsCallable(t.resolve)&&ce.IsCallable(t.reject))){throw new TypeError("Bad promise constructor")}};var n;if(typeof window!=="undefined"&&ce.IsCallable(window.postMessage)){n=function(){var e=[];var t="zero-timeout-message";var r=function(r){M(e,r);window.postMessage(t,"*")};var n=function(r){if(r.source===window&&r.data===t){r.stopPropagation();if(e.length===0){return}var n=N(e);n()}};window.addEventListener("message",n,true);return r}}var o=function(){var e=S.Promise;var t=e&&e.resolve&&e.resolve();return t&&function(e){return t.then(e)}};var i=ce.IsCallable(S.setImmediate)?S.setImmediate:typeof process==="object"&&process.nextTick?process.nextTick:o()||(ce.IsCallable(n)?n():function(t){e(t,0)});var a=function(e){return e};var u=function(e){throw e};var f=0;var s=1;var c=2;var l=0;var p=1;var v=2;var y={};var h=function(e,t,r){i(function(){g(e,t,r)})};var g=function(e,t,r){var n,o;if(t===y){return e(r)}try{n=e(r);o=t.resolve}catch(i){n=i;o=t.reject}o(n)};var d=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.fulfillReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o<n;o++,i+=3){h(r[i+l],r[i+v],t);e[i+l]=void 0;e[i+p]=void 0;e[i+v]=void 0}}}r.result=t;r.state=s;r.reactionLength=0};var m=function(e,t){var r=e._promise;var n=r.reactionLength;if(n>0){h(r.rejectReactionHandler0,r.reactionCapability0,t);r.fulfillReactionHandler0=void 0;r.rejectReactions0=void 0;r.reactionCapability0=void 0;if(n>1){for(var o=1,i=0;o<n;o++,i+=3){h(r[i+p],r[i+v],t);e[i+l]=void 0;e[i+p]=void 0;e[i+v]=void 0}}}r.result=t;r.state=c;r.reactionLength=0};var O=function(e){var t=false;var r=function(r){var n;if(t){return}t=true;if(r===e){return m(e,new TypeError("Self resolution"))}if(!ce.TypeIsObject(r)){return d(e,r)}try{n=r.then}catch(o){return m(e,o)}if(!ce.IsCallable(n)){return d(e,r)}i(function(){j(e,r,n)})};var n=function(r){if(t){return}t=true;return m(e,r)};return{resolve:r,reject:n}};var w=function(e,r,n,o){if(e===I){t(e,r,n,o,y)}else{t(e,r,n,o)}};var j=function(e,t,r){var n=O(e);var o=n.resolve;var i=n.reject;try{w(r,t,o,i)}catch(a){i(a)}};var T,I;var E=function(){var e=function Promise(t){if(!(this instanceof e)){throw new TypeError('Constructor Promise requires "new"')}if(this&&this._promise){throw new TypeError("Bad construction")}if(!ce.IsCallable(t)){throw new TypeError("not a valid resolver")}var r=Ae(this,e,T,{_promise:{result:void 0,state:f,reactionLength:0,fulfillReactionHandler0:void 0,rejectReactionHandler0:void 0,reactionCapability0:void 0}});var n=O(r);var o=n.reject;try{t(n.resolve,o)}catch(i){o(i)}return r};return e}();T=E.prototype;var P=function(e,t,r,n){var o=false;return function(i){if(o){return}o=true;t[e]=i;if(--n.count===0){var a=r.resolve;a(t)}}};var C=function(e,t,r){var n=e.iterator;var o=[];var i={count:1};var a,u;var f=0;while(true){try{a=ce.IteratorStep(n);if(a===false){e.done=true;break}u=a.value}catch(s){e.done=true;throw s}o[f]=void 0;var c=t.resolve(u);var l=P(f,o,r,i);i.count+=1;w(c.then,c,l,r.reject);f+=1}if(--i.count===0){var p=r.resolve;p(o)}return r.promise};var x=function(e,t,r){var n=e.iterator;var o,i,a;while(true){try{o=ce.IteratorStep(n);if(o===false){e.done=true;break}i=o.value}catch(u){e.done=true;throw u}a=t.resolve(i);w(a.then,a,r.resolve,r.reject)}return r.promise};b(E,{all:function all(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Promise is not object")}var n=new r(t);var o,i;try{o=ce.GetIterator(e);i={iterator:o,done:false};return C(i,t,n)}catch(a){var u=a;if(i&&!i.done){try{ce.IteratorClose(o,true)}catch(f){u=f}}var s=n.reject;s(u);return n.promise}},race:function race(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Promise is not object")}var n=new r(t);var o,i;try{o=ce.GetIterator(e);i={iterator:o,done:false};return x(i,t,n)}catch(a){var u=a;if(i&&!i.done){try{ce.IteratorClose(o,true)}catch(f){u=f}}var s=n.reject;s(u);return n.promise}},reject:function reject(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Bad promise constructor")}var n=new r(t);var o=n.reject;o(e);return n.promise},resolve:function resolve(e){var t=this;if(!ce.TypeIsObject(t)){throw new TypeError("Bad promise constructor")}if(ce.IsPromise(e)){var n=e.constructor;if(n===t){return e}}var o=new r(t);var i=o.resolve;i(e);return o.promise}});b(T,{"catch":function(e){return this.then(null,e)},then:function then(e,t){var n=this;if(!ce.IsPromise(n)){throw new TypeError("not a promise")}var o=ce.SpeciesConstructor(n,E);var i;var b=arguments.length>2&&arguments[2]===y;if(b&&o===E){i=y}else{i=new r(o)}var g=ce.IsCallable(e)?e:a;var d=ce.IsCallable(t)?t:u;var m=n._promise;var O;if(m.state===f){if(m.reactionLength===0){m.fulfillReactionHandler0=g;m.rejectReactionHandler0=d;m.reactionCapability0=i}else{var w=3*(m.reactionLength-1);m[w+l]=g;m[w+p]=d;m[w+v]=i}m.reactionLength+=1}else if(m.state===s){O=m.result;h(g,i,O)}else if(m.state===c){O=m.result;h(d,i,O)}else{throw new TypeError("unexpected Promise state")}return i.promise}});y=new r(E);I=T.then;return E}();if(S.Promise){delete S.Promise.accept;delete S.Promise.defer;delete S.Promise.prototype.chain}if(typeof Fr==="function"){b(S,{Promise:Fr});var Dr=w(S.Promise,function(e){return e.resolve(42).then(function(){})instanceof e});var zr=!i(function(){return S.Promise.reject(42).then(null,5).then(null,W)});var qr=i(function(){return S.Promise.call(3,W)});var Wr=function(e){var t=e.resolve(5);t.constructor={};var r=e.resolve(t);try{r.then(null,W).then(null,W)}catch(n){return true}return t===r}(S.Promise);var Gr=s&&function(){var e=0;var t=Object.defineProperty({},"then",{get:function(){e+=1}});Promise.resolve(t);return e===1}();var Hr=function BadResolverPromise(e){var t=new Promise(e);e(3,function(){});this.then=t.then;this.constructor=BadResolverPromise};Hr.prototype=Promise.prototype;Hr.all=Promise.all;var Vr=a(function(){return!!Hr.all([1,2])});if(!Dr||!zr||!qr||Wr||!Gr||Vr){Promise=Fr;ne(S,"Promise",Fr)}if(Promise.all.length!==1){var Br=Promise.all;ne(Promise,"all",function all(e){return ce.Call(Br,this,arguments)})}if(Promise.race.length!==1){var Ur=Promise.race;ne(Promise,"race",function race(e){return ce.Call(Ur,this,arguments)})}if(Promise.resolve.length!==1){var $r=Promise.resolve;ne(Promise,"resolve",function resolve(e){return ce.Call($r,this,arguments)})}if(Promise.reject.length!==1){var Jr=Promise.reject;ne(Promise,"reject",function reject(e){return ce.Call(Jr,this,arguments)})}Mt(Promise,"all");Mt(Promise,"race");Mt(Promise,"resolve");Mt(Promise,"reject");Ce(Promise)}var Xr=function(e){var t=n(p(e,function(e,t){e[t]=true;return e},{}));return e.join(":")===t.join(":")};var Kr=Xr(["z","a","bb"]);var Zr=Xr(["z",1,"a","3",2]);if(s){var Yr=function fastkey(e,t){if(!t&&!Kr){return null}if(se(e)){return"^"+ce.ToString(e)}else if(typeof e==="string"){return"$"+e}else if(typeof e==="number"){if(!Zr){return"n"+e}return e}else if(typeof e==="boolean"){return"b"+e}return null};var Qr=function emptyObject(){return Object.create?Object.create(null):{}};var en=function addIterableToMap(e,n,o){if(r(o)||re.string(o)){l(o,function(e){if(!ce.TypeIsObject(e)){throw new TypeError("Iterator value "+e+" is not an entry object")}n.set(e[0],e[1])})}else if(o instanceof e){t(e.prototype.forEach,o,function(e,t){n.set(t,e)})}else{var i,a;if(!se(o)){a=n.set;if(!ce.IsCallable(a)){throw new TypeError("bad map")}i=ce.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=ce.IteratorStep(i);if(u===false){break}var f=u.value;try{if(!ce.TypeIsObject(f)){throw new TypeError("Iterator value "+f+" is not an entry object")}t(a,n,f[0],f[1])}catch(s){ce.IteratorClose(i,true);throw s}}}}};var tn=function addIterableToSet(e,n,o){if(r(o)||re.string(o)){l(o,function(e){n.add(e)})}else if(o instanceof e){t(e.prototype.forEach,o,function(e){n.add(e)})}else{var i,a;if(!se(o)){a=n.add;if(!ce.IsCallable(a)){throw new TypeError("bad set")}i=ce.GetIterator(o)}if(typeof i!=="undefined"){while(true){var u=ce.IteratorStep(i);if(u===false){break}var f=u.value;try{t(a,n,f)}catch(s){ce.IteratorClose(i,true);throw s}}}}};var rn={Map:function(){var e={};var r=function MapEntry(e,t){this.key=e;this.value=t;this.next=null;this.prev=null};r.prototype.isRemoved=function isRemoved(){return this.key===e};var n=function isMap(e){return!!e._es6map};var o=function requireMapSlot(e,t){if(!ce.TypeIsObject(e)||!n(e)){throw new TypeError("Method Map.prototype."+t+" called on incompatible receiver "+ce.ToString(e))}};var i=function MapIterator(e,t){o(e,"[[MapIterator]]");this.head=e._head;this.i=this.head;this.kind=t};i.prototype={isMapIterator:true,next:function next(){if(!this.isMapIterator){throw new TypeError("Not a MapIterator")}var e=this.i;var t=this.kind;var r=this.head;if(typeof this.i==="undefined"){return Ke()}while(e.isRemoved()&&e!==r){e=e.prev}var n;while(e.next!==r){e=e.next;if(!e.isRemoved()){if(t==="key"){n=e.key}else if(t==="value"){n=e.value}else{n=[e.key,e.value]}this.i=e;return Ke(n)}}this.i=void 0;return Ke()}};Me(i.prototype);var a;var u=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}if(this&&this._es6map){throw new TypeError("Bad construction")}var e=Ae(this,Map,a,{_es6map:true,_head:null,_map:G?new G:null,_size:0,_storage:Qr()});var t=new r(null,null);t.next=t.prev=t;e._head=t;if(arguments.length>0){en(Map,e,arguments[0])}return e};a=u.prototype;m.getter(a,"size",function(){if(typeof this._size==="undefined"){throw new TypeError("size method called on incompatible Map")}return this._size});b(a,{get:function get(e){o(this,"get");var t;var r=Yr(e,true);if(r!==null){t=this._storage[r];if(t){return t.value}else{return}}if(this._map){t=V.call(this._map,e);if(t){return t.value}else{return}}var n=this._head;var i=n;while((i=i.next)!==n){if(ce.SameValueZero(i.key,e)){return i.value}}},has:function has(e){o(this,"has");var t=Yr(e,true);if(t!==null){return typeof this._storage[t]!=="undefined"}if(this._map){return B.call(this._map,e)}var r=this._head;var n=r;while((n=n.next)!==r){if(ce.SameValueZero(n.key,e)){return true}}return false},set:function set(e,t){o(this,"set");var n=this._head;var i=n;var a;var u=Yr(e,true);if(u!==null){if(typeof this._storage[u]!=="undefined"){this._storage[u].value=t;return this}else{a=this._storage[u]=new r(e,t);i=n.prev}}else if(this._map){if(B.call(this._map,e)){V.call(this._map,e).value=t}else{a=new r(e,t);U.call(this._map,e,a);i=n.prev}}while((i=i.next)!==n){if(ce.SameValueZero(i.key,e)){i.value=t;return this}}a=a||new r(e,t);if(ce.SameValue(-0,e)){a.key=+0}a.next=this._head;a.prev=this._head.prev;a.prev.next=a;a.next.prev=a;this._size+=1;return this},"delete":function(t){o(this,"delete");var r=this._head;var n=r;var i=Yr(t,true);if(i!==null){if(typeof this._storage[i]==="undefined"){return false}n=this._storage[i].prev;delete this._storage[i]}else if(this._map){if(!B.call(this._map,t)){return false}n=V.call(this._map,t).prev;H.call(this._map,t)}while((n=n.next)!==r){if(ce.SameValueZero(n.key,t)){n.key=e;n.value=e;n.prev.next=n.next;n.next.prev=n.prev;this._size-=1;return true}}return false},clear:function clear(){o(this,"clear");this._map=G?new G:null;this._size=0;this._storage=Qr();var t=this._head;var r=t;var n=r.next;while((r=n)!==t){r.key=e;r.value=e;n=r.next;r.next=r.prev=t}t.next=t.prev=t},keys:function keys(){o(this,"keys");return new i(this,"key")},values:function values(){o(this,"values");return new i(this,"value")},entries:function entries(){o(this,"entries");return new i(this,"key+value")},forEach:function forEach(e){o(this,"forEach");var r=arguments.length>1?arguments[1]:null;var n=this.entries();for(var i=n.next();!i.done;i=n.next()){if(r){t(e,r,i.value[1],i.value[0],this)}else{e(i.value[1],i.value[0],this)}}}});Me(a,a.entries);return u}(),Set:function(){var e=function isSet(e){return e._es6set&&typeof e._storage!=="undefined"};var r=function requireSetSlot(t,r){if(!ce.TypeIsObject(t)||!e(t)){throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+ce.ToString(t))}};var o;var i=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}if(this&&this._es6set){throw new TypeError("Bad construction")}var e=Ae(this,Set,o,{_es6set:true,"[[SetData]]":null,_storage:Qr()});if(!e._es6set){throw new TypeError("bad set")}if(arguments.length>0){tn(Set,e,arguments[0])}return e};o=i.prototype;var a=function(e){var t=e;if(t==="^null"){return null}else if(t==="^undefined"){return void 0}else{var r=t.charAt(0);if(r==="$"){return C(t,1)}else if(r==="n"){return+C(t,1)}else if(r==="b"){return t==="btrue"}}return+t};var u=function ensureMap(e){if(!e["[[SetData]]"]){var t=new rn.Map;e["[[SetData]]"]=t;l(n(e._storage),function(e){var r=a(e);t.set(r,r)});e["[[SetData]]"]=t}e._storage=null};m.getter(i.prototype,"size",function(){r(this,"size");if(this._storage){return n(this._storage).length}u(this);return this["[[SetData]]"].size});b(i.prototype,{has:function has(e){r(this,"has");var t;if(this._storage&&(t=Yr(e))!==null){return!!this._storage[t]}u(this);return this["[[SetData]]"].has(e)},add:function add(e){r(this,"add");var t;if(this._storage&&(t=Yr(e))!==null){this._storage[t]=true;return this}u(this);this["[[SetData]]"].set(e,e);return this},"delete":function(e){r(this,"delete");var t;if(this._storage&&(t=Yr(e))!==null){var n=z(this._storage,t);return delete this._storage[t]&&n}u(this);return this["[[SetData]]"]["delete"](e)},clear:function clear(){r(this,"clear");if(this._storage){this._storage=Qr()}if(this["[[SetData]]"]){this["[[SetData]]"].clear()}},values:function values(){r(this,"values");u(this);return new f(this["[[SetData]]"].values())},entries:function entries(){r(this,"entries");u(this);return new f(this["[[SetData]]"].entries())},forEach:function forEach(e){r(this,"forEach");var n=arguments.length>1?arguments[1]:null;var o=this;u(o);this["[[SetData]]"].forEach(function(r,i){if(n){t(e,n,i,i,o)}else{e(i,i,o)}})}});h(i.prototype,"keys",i.prototype.values,true);Me(i.prototype,i.prototype.values);var f=function SetIterator(e){this.it=e};f.prototype={isSetIterator:true,next:function next(){if(!this.isSetIterator){throw new TypeError("Not a SetIterator")}return this.it.next()}};Me(f.prototype);return i}()};var nn=S.Set&&!Set.prototype["delete"]&&Set.prototype.remove&&Set.prototype.items&&Set.prototype.map&&Array.isArray((new Set).keys);if(nn){S.Set=rn.Set}if(S.Map||S.Set){var on=a(function(){return new Map([[1,2]]).get(1)===2});if(!on){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new G;if(arguments.length>0){en(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,S.Map.prototype);return e};S.Map.prototype=O(G.prototype);h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,G)}var an=new Map;var un=function(){var e=new Map([[1,0],[2,0],[3,0],[4,0]]);e.set(-0,e);return e.get(0)===e&&e.get(-0)===e&&e.has(0)&&e.has(-0)}();var fn=an.set(1,2)===an;if(!un||!fn){ne(Map.prototype,"set",function set(e,r){t(U,this,e===0?0:e,r);return this})}if(!un){b(Map.prototype,{get:function get(e){return t(V,this,e===0?0:e)},has:function has(e){return t(B,this,e===0?0:e)}},true);m.preserveToString(Map.prototype.get,V);m.preserveToString(Map.prototype.has,B)}var sn=new Set;var cn=Set.prototype["delete"]&&Set.prototype.add&&Set.prototype.has&&function(e){e["delete"](0);e.add(-0);return!e.has(0)}(sn);var ln=sn.add(1)===sn;if(!cn||!ln){var pn=Set.prototype.add;Set.prototype.add=function add(e){t(pn,this,e===0?0:e);return this};m.preserveToString(Set.prototype.add,pn)}if(!cn){var vn=Set.prototype.has;Set.prototype.has=function has(e){return t(vn,this,e===0?0:e)};m.preserveToString(Set.prototype.has,vn);var yn=Set.prototype["delete"];Set.prototype["delete"]=function SetDelete(e){return t(yn,this,e===0?0:e)};m.preserveToString(Set.prototype["delete"],yn)}var hn=w(S.Map,function(e){var t=new e([]);t.set(42,42);return t instanceof e});var bn=Object.setPrototypeOf&&!hn;var gn=function(){try{return!(S.Map()instanceof S.Map)}catch(e){return e instanceof TypeError}}();if(S.Map.length!==0||bn||!gn){S.Map=function Map(){if(!(this instanceof Map)){throw new TypeError('Constructor Map requires "new"')}var e=new G;if(arguments.length>0){en(Map,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Map.prototype);return e};S.Map.prototype=G.prototype;h(S.Map.prototype,"constructor",S.Map,true);m.preserveToString(S.Map,G)}var dn=w(S.Set,function(e){var t=new e([]);t.add(42,42);return t instanceof e});var mn=Object.setPrototypeOf&&!dn;var On=function(){try{return!(S.Set()instanceof S.Set)}catch(e){return e instanceof TypeError}}();if(S.Set.length!==0||mn||!On){var wn=S.Set;S.Set=function Set(){if(!(this instanceof Set)){throw new TypeError('Constructor Set requires "new"')}var e=new wn;if(arguments.length>0){tn(Set,e,arguments[0])}delete e.constructor;Object.setPrototypeOf(e,Set.prototype);return e};S.Set.prototype=wn.prototype;h(S.Set.prototype,"constructor",S.Set,true);m.preserveToString(S.Set,wn)}var jn=new S.Map;var Sn=!a(function(){return jn.keys().next().done});if(typeof S.Map.prototype.clear!=="function"||(new S.Set).size!==0||jn.size!==0||typeof S.Map.prototype.keys!=="function"||typeof S.Set.prototype.keys!=="function"||typeof S.Map.prototype.forEach!=="function"||typeof S.Set.prototype.forEach!=="function"||u(S.Map)||u(S.Set)||typeof jn.keys().next!=="function"||Sn||!hn){b(S,{Map:rn.Map,Set:rn.Set},true)}if(S.Set.prototype.keys!==S.Set.prototype.values){h(S.Set.prototype,"keys",S.Set.prototype.values,true)}Me(Object.getPrototypeOf((new S.Map).keys()));Me(Object.getPrototypeOf((new S.Set).keys()));if(c&&S.Set.prototype.has.name!=="has"){var Tn=S.Set.prototype.has;ne(S.Set.prototype,"has",function has(e){return t(Tn,this,e)})}}b(S,rn);Ce(S.Map);Ce(S.Set)}var In=function throwUnlessTargetIsObject(e){if(!ce.TypeIsObject(e)){throw new TypeError("target must be an object")}};var En={apply:function apply(){return ce.Call(ce.Call,null,arguments)},construct:function construct(e,t){if(!ce.IsConstructor(e)){throw new TypeError("First argument must be a constructor.")}var r=arguments.length>2?arguments[2]:e;if(!ce.IsConstructor(r)){throw new TypeError("new.target must be a constructor.")}return ce.Construct(e,t,r,"internal")},deleteProperty:function deleteProperty(e,t){In(e);if(s){var r=Object.getOwnPropertyDescriptor(e,t);if(r&&!r.configurable){return false}}return delete e[t]},has:function has(e,t){In(e);return t in e}};if(Object.getOwnPropertyNames){Object.assign(En,{ownKeys:function ownKeys(e){In(e);var t=Object.getOwnPropertyNames(e);if(ce.IsCallable(Object.getOwnPropertySymbols)){x(t,Object.getOwnPropertySymbols(e))}return t}})}var Pn=function ConvertExceptionToBoolean(e){return!i(e)};if(Object.preventExtensions){Object.assign(En,{isExtensible:function isExtensible(e){In(e);return Object.isExtensible(e)},preventExtensions:function preventExtensions(e){In(e);return Pn(function(){return Object.preventExtensions(e)})}})}if(s){var Cn=function get(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t);if(!n){var o=Object.getPrototypeOf(e);if(o===null){return void 0}return Cn(o,t,r)}if("value"in n){return n.value}if(n.get){return ce.Call(n.get,r)}return void 0};var Mn=function set(e,r,n,o){var i=Object.getOwnPropertyDescriptor(e,r);if(!i){var a=Object.getPrototypeOf(e);if(a!==null){return Mn(a,r,n,o)}i={value:void 0,writable:true,enumerable:true,configurable:true}}if("value"in i){if(!i.writable){return false}if(!ce.TypeIsObject(o)){return false}var u=Object.getOwnPropertyDescriptor(o,r);if(u){return ae.defineProperty(o,r,{value:n})}else{return ae.defineProperty(o,r,{value:n,writable:true,enumerable:true,configurable:true})}}if(i.set){t(i.set,o,n);return true}return false};Object.assign(En,{defineProperty:function defineProperty(e,t,r){In(e);return Pn(function(){return Object.defineProperty(e,t,r)})},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(e,t){In(e);return Object.getOwnPropertyDescriptor(e,t)},get:function get(e,t){In(e);var r=arguments.length>2?arguments[2]:e;return Cn(e,t,r)},set:function set(e,t,r){In(e);var n=arguments.length>3?arguments[3]:e;return Mn(e,t,r,n)}})}if(Object.getPrototypeOf){var xn=Object.getPrototypeOf;En.getPrototypeOf=function getPrototypeOf(e){In(e);return xn(e)}}if(Object.setPrototypeOf&&En.getPrototypeOf){var Nn=function(e,t){var r=t;while(r){if(e===r){return true}r=En.getPrototypeOf(r)}return false};Object.assign(En,{setPrototypeOf:function setPrototypeOf(e,t){In(e);if(t!==null&&!ce.TypeIsObject(t)){throw new TypeError("proto must be an object or null")}if(t===ae.getPrototypeOf(e)){return true}if(ae.isExtensible&&!ae.isExtensible(e)){return false}if(Nn(e,t)){return false}Object.setPrototypeOf(e,t);return true}})}var An=function(e,t){if(!ce.IsCallable(S.Reflect[e])){h(S.Reflect,e,t)}else{var r=a(function(){S.Reflect[e](1);S.Reflect[e](NaN);S.Reflect[e](true);return true});if(r){ne(S.Reflect,e,t)}}};Object.keys(En).forEach(function(e){An(e,En[e])});var Rn=S.Reflect.getPrototypeOf;if(c&&Rn&&Rn.name!=="getPrototypeOf"){ne(S.Reflect,"getPrototypeOf",function getPrototypeOf(e){return t(Rn,S.Reflect,e)})}if(S.Reflect.setPrototypeOf){if(a(function(){S.Reflect.setPrototypeOf(1,{});return true})){ne(S.Reflect,"setPrototypeOf",En.setPrototypeOf)}}if(S.Reflect.defineProperty){if(!a(function(){var e=!S.Reflect.defineProperty(1,"test",{value:1});var t=typeof Object.preventExtensions!=="function"||!S.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return e&&t})){ne(S.Reflect,"defineProperty",En.defineProperty)}}if(S.Reflect.construct){if(!a(function(){var e=function F(){};return S.Reflect.construct(function(){},[],e)instanceof e})){ne(S.Reflect,"construct",En.construct)}}if(String(new Date(NaN))!=="Invalid Date"){var _n=Date.prototype.toString;var kn=function toString(){var e=+this;if(e!==e){return"Invalid Date"}return ce.Call(_n,this)};ne(Date.prototype,"toString",kn)}var Ln={anchor:function anchor(e){return ce.CreateHTML(this,"a","name",e)},big:function big(){return ce.CreateHTML(this,"big","","")},blink:function blink(){return ce.CreateHTML(this,"blink","","")},bold:function bold(){return ce.CreateHTML(this,"b","","")},fixed:function fixed(){return ce.CreateHTML(this,"tt","","")},fontcolor:function fontcolor(e){return ce.CreateHTML(this,"font","color",e)},fontsize:function fontsize(e){return ce.CreateHTML(this,"font","size",e)},italics:function italics(){return ce.CreateHTML(this,"i","","")},link:function link(e){return ce.CreateHTML(this,"a","href",e)},small:function small(){return ce.CreateHTML(this,"small","","")},strike:function strike(){return ce.CreateHTML(this,"strike","","")},sub:function sub(){return ce.CreateHTML(this,"sub","","")},sup:function sub(){return ce.CreateHTML(this,"sup","","")}};l(Object.keys(Ln),function(e){var r=String.prototype[e];var n=false;if(ce.IsCallable(r)){var o=t(r,"",' " ');var i=P([],o.match(/"/g)).length;n=o!==o.toLowerCase()||i>2}else{n=true}if(n){ne(String.prototype,e,Ln[e])}});var Fn=function(){if(!oe){return false}var e=typeof JSON==="object"&&typeof JSON.stringify==="function"?JSON.stringify:null;if(!e){return false}if(typeof e($())!=="undefined"){return true}if(e([$()])!=="[null]"){return true}var t={a:$()};t[$()]=true;if(e(t)!=="{}"){return true}return false}();var Dn=a(function(){if(!oe){return true}return JSON.stringify(Object($()))==="{}"&&JSON.stringify([Object($())])==="[{}]"});if(Fn||!Dn){var zn=JSON.stringify;ne(JSON,"stringify",function stringify(e){if(typeof e==="symbol"){return}var n;if(arguments.length>1){n=arguments[1]}var o=[e];if(!r(n)){var i=ce.IsCallable(n)?n:null;var a=function(e,r){var n=i?t(i,this,e,r):r;if(typeof n!=="symbol"){if(re.symbol(n)){return Nt({})(n)}else{return n}}};o.push(a)}else{o.push(n)}if(arguments.length>2){o.push(arguments[2])}return zn.apply(this,o)})}return S});
/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function fe(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}ce.fn=ce.prototype={jquery:t,constructor:ce,length:0,toArray:function(){return ae.call(this)},get:function(e){return null==e?ae.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return ce.each(this,e)},map:function(n){return this.pushStack(ce.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(ae.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(ce.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(ce.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:oe.sort,splice:oe.splice},ce.extend=ce.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||v(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(ce.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||ce.isPlainObject(n)?n:{},i=!1,a[t]=ce.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},ce.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==i.call(e))&&(!(t=r(e))||"function"==typeof(n=ue.call(t,"constructor")&&t.constructor)&&o.call(n)===a)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){m(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(c(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)while(t=e[r++])n+=ce.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){var n=t||[];return null!=e&&(c(Object(e))?ce.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:se.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!l.test(t||n&&n.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(c(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:le}),"function"==typeof Symbol&&(ce.fn[Symbol.iterator]=oe[Symbol.iterator]),ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var pe=oe.pop,de=oe.sort,he=oe.splice,ge="[\\x20\\t\\r\\n\\f]",ve=new RegExp("^"+ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ge+"+$","g");ce.contains=function(e,t){var n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(e.contains?e.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))};var f=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function p(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}ce.escapeSelector=function(e){return(e+"").replace(f,p)};var ye=C,me=s;!function(){var e,b,w,o,a,T,r,C,d,i,k=me,S=ce.expando,E=0,n=0,s=W(),c=W(),u=W(),h=W(),l=function(e,t){return e===t&&(a=!0),0},f="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",t="(?:\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",p="\\["+ge+"*("+t+")(?:"+ge+"*([*^$|!~]?=)"+ge+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+t+"))|)"+ge+"*\\]",g=":("+t+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+p+")*)|.*)\\)|)",v=new RegExp(ge+"+","g"),y=new RegExp("^"+ge+"*,"+ge+"*"),m=new RegExp("^"+ge+"*([>+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="<a id='"+S+"' href='' disabled='disabled'></a><select id='"+S+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0<I(t,T,null,[e]).length},I.contains=function(e,t){return(e.ownerDocument||e)!=T&&V(e),ce.contains(e,t)},I.attr=function(e,t){(e.ownerDocument||e)!=T&&V(e);var n=b.attrHandle[t.toLowerCase()],r=n&&ue.call(b.attrHandle,t.toLowerCase())?n(e,t,!C):void 0;return void 0!==r?r:e.getAttribute(t)},I.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ce.uniqueSort=function(e){var t,n=[],r=0,i=0;if(a=!le.sortStable,o=!le.sortStable&&ae.call(e,0),de.call(e,l),a){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)he.call(e,n[r],1)}return o=null,e},ce.fn.uniqueSort=function(){return this.pushStack(ce.uniqueSort(ae.apply(this)))},(b=ce.expr={cacheLength:50,createPseudo:F,match:D,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(v," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(d,e,t,h,g){var v="nth"!==d.slice(0,3),y="last"!==d.slice(-4),m="of-type"===e;return 1===h&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u=v!==y?"nextSibling":"previousSibling",l=e.parentNode,c=m&&e.nodeName.toLowerCase(),f=!n&&!m,p=!1;if(l){if(v){while(u){o=e;while(o=o[u])if(m?fe(o,c):1===o.nodeType)return!1;s=u="only"===d&&!s&&"nextSibling"}return!0}if(s=[y?l.firstChild:l.lastChild],y&&f){p=(a=(r=(i=l[S]||(l[S]={}))[d]||[])[0]===E&&r[1])&&r[2],o=a&&l.childNodes[a];while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if(1===o.nodeType&&++p&&o===e){i[d]=[E,a,p];break}}else if(f&&(p=a=(r=(i=e[S]||(e[S]={}))[d]||[])[0]===E&&r[1]),!1===p)while(o=++a&&o&&o[u]||(p=a=0)||s.pop())if((m?fe(o,c):1===o.nodeType)&&++p&&(f&&((i=o[S]||(o[S]={}))[d]=[E,p]),o===e))break;return(p-=g)===h||p%h==0&&0<=p/h}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||I.error("unsupported pseudo: "+e);return a[S]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?F(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=se.call(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:F(function(e){var r=[],i=[],s=ne(e.replace(ve,"$1"));return s[S]?F(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:F(function(t){return function(e){return 0<I(t,e).length}}),contains:F(function(t){return t=t.replace(O,P),function(e){return-1<(e.textContent||ce.text(e)).indexOf(t)}}),lang:F(function(n){return A.test(n||"")||I.error("unsupported lang: "+n),n=n.replace(O,P).toLowerCase(),function(e){var t;do{if(t=C?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ie.location&&ie.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===r},focus:function(e){return e===function(){try{return T.activeElement}catch(e){}}()&&T.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:z(!1),disabled:z(!0),checked:function(e){return fe(e,"input")&&!!e.checked||fe(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return q.test(e.nodeName)},input:function(e){return N.test(e.nodeName)},button:function(e){return fe(e,"input")&&"button"===e.type||fe(e,"button")},text:function(e){var t;return fe(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:X(function(){return[0]}),last:X(function(e,t){return[t-1]}),eq:X(function(e,t,n){return[n<0?n+t:n]}),even:X(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:X(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:X(function(e,t,n){var r;for(r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:X(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=B(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=_(e);function G(){}function Y(e,t){var n,r,i,o,a,s,u,l=c[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=y.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=m.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ve," ")}),a=a.slice(n.length)),b.filter)!(r=D[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?I.error(e):c(e,s).slice(0)}function Q(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function J(a,e,t){var s=e.dir,u=e.next,l=u||s,c=t&&"parentNode"===l,f=n++;return e.first?function(e,t,n){while(e=e[s])if(1===e.nodeType||c)return a(e,t,n);return!1}:function(e,t,n){var r,i,o=[E,f];if(n){while(e=e[s])if((1===e.nodeType||c)&&a(e,t,n))return!0}else while(e=e[s])if(1===e.nodeType||c)if(i=e[S]||(e[S]={}),u&&fe(e,u))e=e[s]||e;else{if((r=i[l])&&r[0]===E&&r[1]===f)return o[2]=r[2];if((i[l]=o)[2]=a(e,t,n))return!0}return!1}}function K(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Z(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function ee(d,h,g,v,y,e){return v&&!v[S]&&(v=ee(v)),y&&!y[S]&&(y=ee(y,e)),F(function(e,t,n,r){var i,o,a,s,u=[],l=[],c=t.length,f=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)I(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),p=!d||!e&&h?f:Z(f,u,d,n,r);if(g?g(p,s=y||(e?d:c||v)?[]:t,n,r):s=p,v){i=Z(s,l),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(s[l[o]]=!(p[l[o]]=a))}if(e){if(y||d){if(y){i=[],o=s.length;while(o--)(a=s[o])&&i.push(p[o]=a);y(null,s=[],i,r)}o=s.length;while(o--)(a=s[o])&&-1<(i=y?se.call(e,a):u[o])&&(e[i]=!(t[i]=a))}}else s=Z(s===t?s.splice(c,s.length):s),y?y(null,t,s,r):k.apply(t,s)})}function te(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=J(function(e){return e===i},a,!0),l=J(function(e){return-1<se.call(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!=w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[J(K(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[S]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return ee(1<s&&K(c),1<s&&Q(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(ve,"$1"),t,s<n&&te(e.slice(s,n)),n<r&&te(e=e.slice(n)),n<r&&Q(e))}c.push(t)}return K(c)}function ne(e,t){var n,v,y,m,x,r,i=[],o=[],a=u[e+" "];if(!a){t||(t=Y(e)),n=t.length;while(n--)(a=te(t[n]))[S]?i.push(a):o.push(a);(a=u(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=E+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==T||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==T||(V(o),n=!C);while(s=v[a++])if(s(o,t||T,n)){k.call(r,o);break}i&&(E=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=pe.call(r));f=Z(f)}k.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&ce.uniqueSort(r)}return i&&(E=h,w=p),c},m?F(r):r))).selector=e}return a}function re(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&Y(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&C&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(O,P),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=D.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(O,P),H.test(o[0].type)&&U(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&Q(o)))return k.apply(n,r),n;break}}}return(l||ne(e,c))(r,t,!C,n,!t||H.test(e)&&U(t.parentNode)||t),n}G.prototype=b.filters=b.pseudos,b.setFilters=new G,le.sortStable=S.split("").sort(l).join("")===S,V(),le.sortDetached=$(function(e){return 1&e.compareDocumentPosition(T.createElement("fieldset"))}),ce.find=I,ce.expr[":"]=ce.expr.pseudos,ce.unique=ce.uniqueSort,I.compile=ne,I.select=re,I.setDocument=V,I.tokenize=Y,I.escape=ce.escapeSelector,I.getText=ce.text,I.isXML=ce.isXMLDoc,I.selectors=ce.expr,I.support=ce.support,I.uniqueSort=ce.uniqueSort}();var d=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&ce(e).is(n))break;r.push(e)}return r},h=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},b=ce.expr.match.needsContext,w=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1<se.call(n,e)!==r}):ce.filter(n,e,r)}ce.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},ce.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;t<r;t++)if(ce.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)ce.find(e,i[t],n);return 1<r?ce.uniqueSort(n):n},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&b.test(e)?ce(e):e||[],!1).length}});var k,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(ce.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&ce(e);if(!b.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&ce.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?ce.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?se.call(ce(e),this[0]):se.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ce.uniqueSort(ce.merge(this.get(),ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return d(e,"parentNode")},parentsUntil:function(e,t,n){return d(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return d(e,"nextSibling")},prevAll:function(e){return d(e,"previousSibling")},nextUntil:function(e,t,n){return d(e,"nextSibling",n)},prevUntil:function(e,t,n){return d(e,"previousSibling",n)},siblings:function(e){return h((e.parentNode||{}).firstChild,e)},children:function(e){return h(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(fe(e,"template")&&(e=e.content||e),ce.merge([],e.childNodes))}},function(r,i){ce.fn[r]=function(e,t){var n=ce.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=ce.filter(t,n)),1<this.length&&(j[r]||ce.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var D=/[^\x20\t\r\n\f]+/g;function N(e){return e}function q(e){throw e}function L(e,t,n,r){var i;try{e&&v(i=e.promise)?i.call(e).done(t).fail(n):e&&v(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}ce.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},ce.each(e.match(D)||[],function(e,t){n[t]=!0}),n):ce.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){ce.each(e,function(e,t){v(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==x(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return ce.each(arguments,function(e,t){var n;while(-1<(n=ce.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<ce.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},ce.extend({Deferred:function(e){var o=[["notify","progress",ce.Callbacks("memory"),ce.Callbacks("memory"),2],["resolve","done",ce.Callbacks("once memory"),ce.Callbacks("once memory"),0,"resolved"],["reject","fail",ce.Callbacks("once memory"),ce.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return ce.Deferred(function(r){ce.each(o,function(e,t){var n=v(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&v(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,v(t)?s?t.call(e,l(u,o,N,s),l(u,o,q,s)):(u++,t.call(e,l(u,o,N,s),l(u,o,q,s),l(u,o,N,o.notifyWith))):(a!==N&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){ce.Deferred.exceptionHook&&ce.Deferred.exceptionHook(e,t.error),u<=i+1&&(a!==q&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(ce.Deferred.getErrorHook?t.error=ce.Deferred.getErrorHook():ce.Deferred.getStackHook&&(t.error=ce.Deferred.getStackHook()),ie.setTimeout(t))}}return ce.Deferred(function(e){o[0][3].add(l(0,e,v(r)?r:N,e.notifyWith)),o[1][3].add(l(0,e,v(t)?t:N)),o[2][3].add(l(0,e,v(n)?n:q))}).promise()},promise:function(e){return null!=e?ce.extend(e,a):a}},s={};return ce.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=ae.call(arguments),o=ce.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?ae.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(L(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||v(i[t]&&i[t].then)))return o.then();while(t--)L(i[t],a(t),o.reject);return o.promise()}});var H=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;ce.Deferred.exceptionHook=function(e,t){ie.console&&ie.console.warn&&e&&H.test(e.name)&&ie.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},ce.readyException=function(e){ie.setTimeout(function(){throw e})};var O=ce.Deferred();function P(){C.removeEventListener("DOMContentLoaded",P),ie.removeEventListener("load",P),ce.ready()}ce.fn.ready=function(e){return O.then(e)["catch"](function(e){ce.readyException(e)}),this},ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--ce.readyWait:ce.isReady)||(ce.isReady=!0)!==e&&0<--ce.readyWait||O.resolveWith(C,[ce])}}),ce.ready.then=O.then,"complete"===C.readyState||"loading"!==C.readyState&&!C.documentElement.doScroll?ie.setTimeout(ce.ready):(C.addEventListener("DOMContentLoaded",P),ie.addEventListener("load",P));var M=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n))for(s in i=!0,n)M(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,v(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ce(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},R=/^-ms-/,I=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function F(e){return e.replace(R,"ms-").replace(I,W)}var $=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function B(){this.expando=ce.expando+B.uid++}B.uid=1,B.prototype={cache:function(e){var t=e[this.expando];return t||(t={},$(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[F(t)]=n;else for(r in t)i[F(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][F(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(F):(t=F(t))in r?[t]:t.match(D)||[]).length;while(n--)delete r[t[n]]}(void 0===t||ce.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ce.isEmptyObject(t)}};var _=new B,z=new B,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,U=/[A-Z]/g;function V(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(U,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:X.test(i)?JSON.parse(i):i)}catch(e){}z.set(e,t,n)}else n=void 0;return n}ce.extend({hasData:function(e){return z.hasData(e)||_.hasData(e)},data:function(e,t,n){return z.access(e,t,n)},removeData:function(e,t){z.remove(e,t)},_data:function(e,t,n){return _.access(e,t,n)},_removeData:function(e,t){_.remove(e,t)}}),ce.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=z.get(o),1===o.nodeType&&!_.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=F(r.slice(5)),V(o,r,i[r]));_.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){z.set(this,n)}):M(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=z.get(o,n))?t:void 0!==(t=V(o,n))?t:void 0;this.each(function(){z.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){z.remove(this,e)})}}),ce.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=_.get(e,t),n&&(!r||Array.isArray(n)?r=_.access(e,t,ce.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){ce.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return _.get(e,n)||_.access(e,n,{empty:ce.Callbacks("once memory").add(function(){_.remove(e,[t+"queue",n])})})}}),ce.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?ce.queue(this[0],t):void 0===n?this:this.each(function(){var e=ce.queue(this,t,n);ce._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&ce.dequeue(this,t)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=ce.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=_.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var G=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Y=new RegExp("^(?:([+-])=|)("+G+")([a-z%]*)$","i"),Q=["Top","Right","Bottom","Left"],J=C.documentElement,K=function(e){return ce.contains(e.ownerDocument,e)},Z={composed:!0};J.getRootNode&&(K=function(e){return ce.contains(e.ownerDocument,e)||e.getRootNode(Z)===e.ownerDocument});var ee=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&K(e)&&"none"===ce.css(e,"display")};function te(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return ce.css(e,t,"")},u=s(),l=n&&n[3]||(ce.cssNumber[t]?"":"px"),c=e.nodeType&&(ce.cssNumber[t]||"px"!==l&&+u)&&Y.exec(ce.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)ce.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,ce.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ne={};function re(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=_.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ee(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ne[s])||(o=a.body.appendChild(a.createElement(s)),u=ce.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ne[s]=u)))):"none"!==n&&(l[c]="none",_.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}ce.fn.extend({show:function(){return re(this,!0)},hide:function(){return re(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ee(this)?ce(this).show():ce(this).hide()})}});var xe,be,we=/^(?:checkbox|radio)$/i,Te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="<textarea>x</textarea>",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="<option></option>",le.option=!!xe.lastChild;var ke={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n<r;n++)_.set(e[n],"globalEval",!t||_.get(t[n],"globalEval"))}ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td,le.option||(ke.optgroup=ke.option=[1,"<select multiple='multiple'>","</select>"]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))ce.merge(p,o.nodeType?[o]:o);else if(je.test(o)){a=a||f.appendChild(t.createElement("div")),s=(Te.exec(o)||["",""])[1].toLowerCase(),u=ke[s]||ke._default,a.innerHTML=u[1]+ce.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;ce.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<ce.inArray(o,r))i&&i.push(o);else if(l=K(o),a=Se(f.appendChild(o),"script"),l&&Ee(a),n){c=0;while(o=a[c++])Ce.test(o.type||"")&&n.push(o)}return f}var De=/^([^.]*)(?:\.(.+)|)/;function Ne(){return!0}function qe(){return!1}function Le(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=qe;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return ce().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=ce.guid++)),e.each(function(){ce.event.add(this,t,i,r,n)})}function He(e,r,t){t?(_.set(e,r,!1),ce.event.add(e,r,{namespace:!1,handler:function(e){var t,n=_.get(this,r);if(1&e.isTrigger&&this[r]){if(n)(ce.event.special[r]||{}).delegateType&&e.stopPropagation();else if(n=ae.call(arguments),_.set(this,r,n),this[r](),t=_.get(this,r),_.set(this,r,!1),n!==t)return e.stopImmediatePropagation(),e.preventDefault(),t}else n&&(_.set(this,r,ce.event.trigger(n[0],n.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Ne)}})):void 0===_.get(e,r)&&ce.event.add(e,r,Ne)}ce.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.get(t);if($(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&ce.find.matchesSelector(J,i),n.guid||(n.guid=ce.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ce&&ce.event.triggered!==e.type?ce.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(D)||[""]).length;while(l--)d=g=(s=De.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=ce.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=ce.event.special[d]||{},c=ce.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ce.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),ce.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=_.hasData(e)&&_.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(D)||[""]).length;while(l--)if(d=g=(s=De.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=ce.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||ce.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(u)&&_.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=ce.event.fix(e),l=(_.get(this,"events")||Object.create(null))[u.type]||[],c=ce.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=ce.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((ce.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<ce(i,this).index(l):ce.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(ce.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[ce.expando]?e:new ce.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click",!0),!1},trigger:function(e){var t=this||e;return we.test(t.type)&&t.click&&fe(t,"input")&&He(t,"click"),!0},_default:function(e){var t=e.target;return we.test(t.type)&&t.click&&fe(t,"input")&&_.get(t,"click")||fe(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ce.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ce.Event=function(e,t){if(!(this instanceof ce.Event))return new ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ne:qe,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[ce.expando]=!0},ce.Event.prototype={constructor:ce.Event,isDefaultPrevented:qe,isPropagationStopped:qe,isImmediatePropagationStopped:qe,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ne,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ne,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ne,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},ce.event.addProp),ce.each({focus:"focusin",blur:"focusout"},function(r,i){function o(e){if(C.documentMode){var t=_.get(this,"handle"),n=ce.event.fix(e);n.type="focusin"===e.type?"focus":"blur",n.isSimulated=!0,t(e),n.target===n.currentTarget&&t(n)}else ce.event.simulate(i,e.target,ce.event.fix(e))}ce.event.special[r]={setup:function(){var e;if(He(this,r,!0),!C.documentMode)return!1;(e=_.get(this,i))||this.addEventListener(i,o),_.set(this,i,(e||0)+1)},trigger:function(){return He(this,r),!0},teardown:function(){var e;if(!C.documentMode)return!1;(e=_.get(this,i)-1)?_.set(this,i,e):(this.removeEventListener(i,o),_.remove(this,i))},_default:function(e){return _.get(e.target,r)},delegateType:i},ce.event.special[i]={setup:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i);n||(C.documentMode?this.addEventListener(i,o):e.addEventListener(r,o,!0)),_.set(t,i,(n||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=C.documentMode?this:e,n=_.get(t,i)-1;n?_.set(t,i,n):(C.documentMode?this.removeEventListener(i,o):e.removeEventListener(r,o,!0),_.remove(t,i))}}}),ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){ce.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||ce.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),ce.fn.extend({on:function(e,t,n,r){return Le(this,e,t,n,r)},one:function(e,t,n,r){return Le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ce(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=qe),this.each(function(){ce.event.remove(this,e,n,t)})}});var Oe=/<script|<style|<link/i,Pe=/checked\s*(?:[^=]|=\s*.checked.)/i,Me=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)ce.event.add(t,i,s[i][n]);z.hasData(e)&&(o=z.access(e),a=ce.extend({},o),z.set(t,a))}}function $e(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=v(d);if(h||1<f&&"string"==typeof d&&!le.checkClone&&Pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),$e(t,r,i,o)});if(f&&(t=(e=Ae(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=ce.map(Se(e,"script"),Ie)).length;c<f;c++)u=e,c!==p&&(u=ce.clone(u,!0,!0),s&&ce.merge(a,Se(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,ce.map(a,We),c=0;c<s;c++)u=a[c],Ce.test(u.type||"")&&!_.access(u,"globalEval")&&ce.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?ce._evalUrl&&!u.noModule&&ce._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):m(u.textContent.replace(Me,""),u,l))}return n}function Be(e,t,n){for(var r,i=t?ce.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ce.cleanData(Se(r)),r.parentNode&&(n&&K(r)&&Ee(Se(r,"script")),r.parentNode.removeChild(r));return e}ce.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=K(e);if(!(le.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(a=Se(c),r=0,i=(o=Se(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&we.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Se(e),a=a||Se(c),r=0,i=o.length;r<i;r++)Fe(o[r],a[r]);else Fe(e,c);return 0<(a=Se(c,"script")).length&&Ee(a,!f&&Se(e,"script")),c},cleanData:function(e){for(var t,n,r,i=ce.event.special,o=0;void 0!==(n=e[o]);o++)if($(n)){if(t=n[_.expando]){if(t.events)for(r in t.events)i[r]?ce.event.remove(n,r):ce.removeEvent(n,r,t.handle);n[_.expando]=void 0}n[z.expando]&&(n[z.expando]=void 0)}}}),ce.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return M(this,function(e){return void 0===e?ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return $e(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Re(this,e).appendChild(e)})},prepend:function(){return $e(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Re(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return $e(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ce.cleanData(Se(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return M(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Oe.test(e)&&!ke[(Te.exec(e)||["",""])[1].toLowerCase()]){e=ce.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(ce.cleanData(Se(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return $e(this,arguments,function(e){var t=this.parentNode;ce.inArray(this,n)<0&&(ce.cleanData(Se(this)),t&&t.replaceChild(e,this))},n)}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){ce.fn[e]=function(e){for(var t,n=[],r=ce(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),ce(r[o])[a](t),s.apply(n,t.get());return this.pushStack(n)}});var _e=new RegExp("^("+G+")(?!px)[a-z%]+$","i"),ze=/^--/,Xe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=ie),t.getComputedStyle(e)},Ue=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ve=new RegExp(Q.join("|"),"i");function Ge(e,t,n){var r,i,o,a,s=ze.test(t),u=e.style;return(n=n||Xe(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace(ve,"$1")||void 0),""!==a||K(e)||(a=ce.style(e,t)),!le.pixelBoxStyles()&&_e.test(a)&&Ve.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function Ye(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",J.appendChild(u).appendChild(l);var e=ie.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),J.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=C.createElement("div"),l=C.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",le.clearCloneStyle="content-box"===l.style.backgroundClip,ce.extend(le,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=C.createElement("table"),t=C.createElement("tr"),n=C.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",J.appendChild(e).appendChild(t).appendChild(n),r=ie.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,J.removeChild(e)),a}}))}();var Qe=["Webkit","Moz","ms"],Je=C.createElement("div").style,Ke={};function Ze(e){var t=ce.cssProps[e]||Ke[e];return t||(e in Je?e:Ke[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Qe.length;while(n--)if((e=Qe[n]+t)in Je)return e}(e)||e)}var et=/^(none|table(?!-c[ea]).+)/,tt={position:"absolute",visibility:"hidden",display:"block"},nt={letterSpacing:"0",fontWeight:"400"};function rt(e,t,n){var r=Y.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function it(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=ce.css(e,n+Q[a],!0,i)),r?("content"===n&&(u-=ce.css(e,"padding"+Q[a],!0,i)),"margin"!==n&&(u-=ce.css(e,"border"+Q[a]+"Width",!0,i))):(u+=ce.css(e,"padding"+Q[a],!0,i),"padding"!==n?u+=ce.css(e,"border"+Q[a]+"Width",!0,i):s+=ce.css(e,"border"+Q[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function ot(e,t,n){var r=Xe(e),i=(!le.boxSizingReliable()||n)&&"border-box"===ce.css(e,"boxSizing",!1,r),o=i,a=Ge(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(_e.test(a)){if(!n)return a;a="auto"}return(!le.boxSizingReliable()&&i||!le.reliableTrDimensions()&&fe(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===ce.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===ce.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+it(e,t,n||(i?"border":"content"),o,r,a)+"px"}function at(e,t,n,r,i){return new at.prototype.init(e,t,n,r,i)}ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ge(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=F(t),u=ze.test(t),l=e.style;if(u||(t=Ze(s)),a=ce.cssHooks[t]||ce.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=Y.exec(n))&&i[1]&&(n=te(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(ce.cssNumber[s]?"":"px")),le.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=F(t);return ze.test(t)||(t=Ze(s)),(a=ce.cssHooks[t]||ce.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Ge(e,t,r)),"normal"===i&&t in nt&&(i=nt[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),ce.each(["height","width"],function(e,u){ce.cssHooks[u]={get:function(e,t,n){if(t)return!et.test(ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ot(e,u,n):Ue(e,tt,function(){return ot(e,u,n)})},set:function(e,t,n){var r,i=Xe(e),o=!le.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===ce.css(e,"boxSizing",!1,i),s=n?it(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-it(e,u,"border",!1,i)-.5)),s&&(r=Y.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=ce.css(e,u)),rt(0,t,s)}}}),ce.cssHooks.marginLeft=Ye(le.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ge(e,"marginLeft"))||e.getBoundingClientRect().left-Ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),ce.each({margin:"",padding:"",border:"Width"},function(i,o){ce.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+Q[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(ce.cssHooks[i+o].set=rt)}),ce.fn.extend({css:function(e,t){return M(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Xe(e),i=t.length;a<i;a++)o[t[a]]=ce.css(e,t[a],!1,r);return o}return void 0!==n?ce.style(e,t,n):ce.css(e,t)},e,t,1<arguments.length)}}),((ce.Tween=at).prototype={constructor:at,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=at.propHooks[this.prop];return e&&e.get?e.get(this):at.propHooks._default.get(this)},run:function(e){var t,n=at.propHooks[this.prop];return this.options.duration?this.pos=t=ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):at.propHooks._default.set(this),this}}).init.prototype=at.prototype,(at.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ce.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):1!==e.elem.nodeType||!ce.cssHooks[e.prop]&&null==e.elem.style[Ze(e.prop)]?e.elem[e.prop]=e.now:ce.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=at.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ce.fx=at.prototype.init,ce.fx.step={};var st,ut,lt,ct,ft=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function dt(){ut&&(!1===C.hidden&&ie.requestAnimationFrame?ie.requestAnimationFrame(dt):ie.setTimeout(dt,ce.fx.interval),ce.fx.tick())}function ht(){return ie.setTimeout(function(){st=void 0}),st=Date.now()}function gt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=Q[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(yt.tweeners[t]||[]).concat(yt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function yt(o,e,t){var n,a,r=0,i=yt.prefilters.length,s=ce.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=st||ht(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:ce.extend({},e),opts:ce.extend(!0,{specialEasing:{},easing:ce.easing._default},t),originalProperties:e,originalOptions:t,startTime:st||ht(),duration:t.duration,tweens:[],createTween:function(e,t){var n=ce.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=F(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=ce.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=yt.prefilters[r].call(l,o,c,l.opts))return v(n.stop)&&(ce._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return ce.map(c,vt,l),v(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),ce.fx.timer(ce.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}ce.Animation=ce.extend(yt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return te(n.elem,e,Y.exec(t),n),n}]},tweener:function(e,t){v(e)?(t=e,e=["*"]):e=e.match(D);for(var n,r=0,i=e.length;r<i;r++)n=e[r],yt.tweeners[n]=yt.tweeners[n]||[],yt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ee(e),v=_.get(e,"fxshow");for(r in n.queue||(null==(a=ce._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,ce.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ft.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||ce.style(e,r)}if((u=!ce.isEmptyObject(t))||!ce.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=_.get(e,"display")),"none"===(c=ce.css(e,"display"))&&(l?c=l:(re([e],!0),l=e.style.display||l,c=ce.css(e,"display"),re([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===ce.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=_.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&re([e],!0),p.done(function(){for(r in g||re([e]),_.remove(e,"fxshow"),d)ce.style(e,r,d[r])})),u=vt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?yt.prefilters.unshift(e):yt.prefilters.push(e)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||v(e)&&e,duration:e,easing:n&&t||t&&!v(t)&&t};return ce.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in ce.fx.speeds?r.duration=ce.fx.speeds[r.duration]:r.duration=ce.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ee).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=ce.isEmptyObject(t),o=ce.speed(e,n,r),a=function(){var e=yt(this,ce.extend({},t),o);(i||_.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=ce.timers,r=_.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&pt.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||ce.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=_.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=ce.timers,o=n?n.length:0;for(t.finish=!0,ce.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),ce.each(["toggle","show","hide"],function(e,r){var i=ce.fn[r];ce.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(gt(r,!0),e,t,n)}}),ce.each({slideDown:gt("show"),slideUp:gt("hide"),slideToggle:gt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){ce.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),ce.timers=[],ce.fx.tick=function(){var e,t=0,n=ce.timers;for(st=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||ce.fx.stop(),st=void 0},ce.fx.timer=function(e){ce.timers.push(e),ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){ut||(ut=!0,dt())},ce.fx.stop=function(){ut=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fn.delay=function(r,e){return r=ce.fx&&ce.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=ie.setTimeout(e,r);t.stop=function(){ie.clearTimeout(n)}})},lt=C.createElement("input"),ct=C.createElement("select").appendChild(C.createElement("option")),lt.type="checkbox",le.checkOn=""!==lt.value,le.optSelected=ct.selected,(lt=C.createElement("input")).value="t",lt.type="radio",le.radioValue="t"===lt.value;var mt,xt=ce.expr.attrHandle;ce.fn.extend({attr:function(e,t){return M(this,ce.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})}}),ce.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?ce.prop(e,t,n):(1===o&&ce.isXMLDoc(e)||(i=ce.attrHooks[t.toLowerCase()]||(ce.expr.match.bool.test(t)?mt:void 0)),void 0!==n?null===n?void ce.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=ce.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!le.radioValue&&"radio"===t&&fe(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(D);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),mt={set:function(e,t,n){return!1===t?ce.removeAttr(e,n):e.setAttribute(n,n),n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,t){var a=xt[t]||ce.find.attr;xt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=xt[o],xt[o]=r,r=null!=a(e,t,n)?o:null,xt[o]=i),r}});var bt=/^(?:input|select|textarea|button)$/i,wt=/^(?:a|area)$/i;function Tt(e){return(e.match(D)||[]).join(" ")}function Ct(e){return e.getAttribute&&e.getAttribute("class")||""}function kt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(D)||[]}ce.fn.extend({prop:function(e,t){return M(this,ce.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[ce.propFix[e]||e]})}}),ce.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ce.isXMLDoc(e)||(t=ce.propFix[t]||t,i=ce.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):bt.test(e.nodeName)||wt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),le.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.fn.extend({addClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).addClass(t.call(this,e,Ct(this)))}):(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return v(t)?this.each(function(e){ce(this).removeClass(t.call(this,e,Ct(this)))}):arguments.length?(e=kt(t)).length?this.each(function(){if(r=Ct(this),n=1===this.nodeType&&" "+Tt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=Tt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return v(t)?this.each(function(e){ce(this).toggleClass(t.call(this,e,Ct(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=kt(t),this.each(function(){if(s)for(o=ce(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=Ct(this))&&_.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":_.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+Tt(Ct(n))+" ").indexOf(t))return!0;return!1}});var St=/\r/g;ce.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=v(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,ce(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=ce.map(t,function(e){return null==e?"":e+""})),(r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=ce.valHooks[t.type]||ce.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(St,""):null==e?"":e:void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:Tt(ce.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!fe(n.parentNode,"optgroup"))){if(t=ce(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=ce.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<ce.inArray(ce.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<ce.inArray(ce(e).val(),t)}},le.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Et=ie.location,jt={guid:Date.now()},At=/\?/;ce.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new ie.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||ce.error("Invalid XML: "+(n?ce.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Dt=/^(?:focusinfocus|focusoutblur)$/,Nt=function(e){e.stopPropagation()};ce.extend(ce.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||C],d=ue.call(e,"type")?e.type:e,h=ue.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||C,3!==n.nodeType&&8!==n.nodeType&&!Dt.test(d+ce.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[ce.expando]?e:new ce.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:ce.makeArray(t,[e]),c=ce.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!y(n)){for(s=c.delegateType||d,Dt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||C)&&p.push(a.defaultView||a.parentWindow||ie)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(_.get(o,"events")||Object.create(null))[e.type]&&_.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&$(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!$(n)||u&&v(n[d])&&!y(n)&&((a=n[u])&&(n[u]=null),ce.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Nt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Nt),ce.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=ce.extend(new ce.Event,n,{type:e,isSimulated:!0});ce.event.trigger(r,null,t)}}),ce.fn.extend({trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return ce.event.trigger(e,t,n,!0)}});var qt=/\[\]$/,Lt=/\r?\n/g,Ht=/^(?:submit|button|image|reset|file)$/i,Ot=/^(?:input|select|textarea|keygen)/i;function Pt(n,e,r,i){var t;if(Array.isArray(e))ce.each(e,function(e,t){r||qt.test(n)?i(n,t):Pt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==x(e))i(n,e);else for(t in e)Pt(n+"["+t+"]",e[t],r,i)}ce.param=function(e,t){var n,r=[],i=function(e,t){var n=v(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){i(this.name,this.value)});else for(n in e)Pt(n,e[n],t,i);return r.join("&")},ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&Ot.test(this.nodeName)&&!Ht.test(e)&&(this.checked||!we.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:Array.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(Lt,"\r\n")}}):{name:t.name,value:n.replace(Lt,"\r\n")}}).get()}});var Mt=/%20/g,Rt=/#.*$/,It=/([?&])_=[^&]*/,Wt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,$t=/^\/\//,Bt={},_t={},zt="*/".concat("*"),Xt=C.createElement("a");function Ut(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(D)||[];if(v(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Vt(t,i,o,a){var s={},u=t===_t;function l(e){var r;return s[e]=!0,ce.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Gt(e,t){var n,r,i=ce.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&ce.extend(!0,e,r),e}Xt.href=Et.href,ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Gt(Gt(e,ce.ajaxSettings),t):Gt(ce.ajaxSettings,e)},ajaxPrefilter:Ut(Bt),ajaxTransport:Ut(_t),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=ce.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?ce(y):ce.event,x=ce.Deferred(),b=ce.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Wt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace($t,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(D)||[""],null==v.crossDomain){r=C.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Xt.protocol+"//"+Xt.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=ce.param(v.data,v.traditional)),Vt(Bt,v,t,T),h)return T;for(i in(g=ce.event&&v.global)&&0==ce.active++&&ce.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Ft.test(v.type),f=v.url.replace(Rt,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Mt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(At.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(It,"$1"),o=(At.test(f)?"&":"?")+"_="+jt.guid+++o),v.url=f+o),v.ifModified&&(ce.lastModified[f]&&T.setRequestHeader("If-Modified-Since",ce.lastModified[f]),ce.etag[f]&&T.setRequestHeader("If-None-Match",ce.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+zt+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=Vt(_t,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=ie.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&ie.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),!i&&-1<ce.inArray("script",v.dataTypes)&&ce.inArray("json",v.dataTypes)<0&&(v.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(ce.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(ce.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--ce.active||ce.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,t){return ce.get(e,void 0,t,"script")}}),ce.each(["get","post"],function(e,i){ce[i]=function(e,t,n,r){return v(t)&&(r=r||n,n=t,t=void 0),ce.ajax(ce.extend({url:e,type:i,dataType:r,data:t,success:n},ce.isPlainObject(e)&&e))}}),ce.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),ce._evalUrl=function(e,t,n){return ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){ce.globalEval(e,t,n)}})},ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return v(n)?this.each(function(e){ce(this).wrapInner(n.call(this,e))}):this.each(function(){var e=ce(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=v(t);return this.each(function(e){ce(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){ce(this).replaceWith(this.childNodes)}),this}}),ce.expr.pseudos.hidden=function(e){return!ce.expr.pseudos.visible(e)},ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},ce.ajaxSettings.xhr=function(){try{return new ie.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Qt=ce.ajaxSettings.xhr();le.cors=!!Qt&&"withCredentials"in Qt,le.ajax=Qt=!!Qt,ce.ajaxTransport(function(i){var o,a;if(le.cors||Qt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Yt[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&ie.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ce.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=ce("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=Tt(e.slice(s)),e=e.slice(0,s)),v(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&ce.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?ce("<div>").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var en=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;ce.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),v(e))return r=ae.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(ae.call(arguments)))}).guid=e.guid=e.guid||ce.guid++,i},ce.holdReady=function(e){e?ce.readyWait++:ce.ready(!0)},ce.isArray=Array.isArray,ce.parseJSON=JSON.parse,ce.nodeName=fe,ce.isFunction=v,ce.isWindow=y,ce.camelCase=F,ce.type=x,ce.now=Date.now,ce.isNumeric=function(e){var t=ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},ce.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce});var tn=ie.jQuery,nn=ie.$;return ce.noConflict=function(e){return ie.$===ce&&(ie.$=nn),e&&ie.jQuery===ce&&(ie.jQuery=tn),ce},"undefined"==typeof e&&(ie.jQuery=ie.$=ce),ce});
/*
 * jQuery throttle / debounce - v1.1 - 3/7/2010
 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
 * 
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
/*!
 * imagesLoaded PACKAGED v4.1.4
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
/*! lz-string.min.js v1.5.0 | (c) 2023 Pieroxy | MIT license */
var LZString=function(){var r=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n<r.length;n++)e[r][r.charAt(n)]=n}return e[r][o]}var i={compressToBase64:function(r){if(null==r)return"";var n=i._compress(r,6,function(r){return o.charAt(r)});switch(n.length%4){default:case 0:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},decompressFromBase64:function(r){return null==r?"":""==r?null:i._decompress(r.length,32,function(n){return t(o,r.charAt(n))})},compressToUTF16:function(o){return null==o?"":i._compress(o,15,function(o){return r(o+32)})+" "},decompressFromUTF16:function(r){return null==r?"":""==r?null:i._decompress(r.length,16384,function(o){return r.charCodeAt(o)-32})},compressToUint8Array:function(r){for(var o=i.compress(r),n=new Uint8Array(2*o.length),e=0,t=o.length;e<t;e++){var s=o.charCodeAt(e);n[2*e]=s>>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e<t;e++)n[e]=256*o[2*e]+o[2*e+1];var s=[];return n.forEach(function(o){s.push(r(o))}),i.decompress(s.join(""))},compressToEncodedURIComponent:function(r){return null==r?"":i._compress(r,6,function(r){return n.charAt(r)})},decompressFromEncodedURIComponent:function(r){return null==r?"":""==r?null:(r=r.replace(/ /g,"+"),i._decompress(r.length,32,function(o){return t(n,r.charAt(o))}))},compress:function(o){return i._compress(o,16,function(o){return r(o)})},_compress:function(r,o,n){if(null==r)return"";var e,t,i,s={},u={},a="",p="",c="",l=2,f=3,h=2,d=[],m=0,v=0;for(i=0;i<r.length;i+=1)if(a=r.charAt(i),Object.prototype.hasOwnProperty.call(s,a)||(s[a]=f++,u[a]=!0),p=c+a,Object.prototype.hasOwnProperty.call(s,p))c=p;else{if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(""!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e<h;e++)m<<=1,v==o-1?(v=0,d.push(n(m)),m=0):v++;for(t=c.charCodeAt(0),e=0;e<8;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}else{for(t=1,e=0;e<h;e++)m=m<<1|t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t=0;for(t=c.charCodeAt(0),e=0;e<16;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e<h;e++)m=m<<1|1&t,v==o-1?(v=0,d.push(n(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join("")},decompress:function(r){return null==r?"":""==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m="",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return""}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return"";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return LZString});
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/dist/FileSaver.js */
(function(a,b){if("function"==typeof define&&define.amd)define([],b);else if("undefined"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,"undefined"!=typeof module&&(module.exports=g)});
/*! seedrandom.js v3.0.5 | Copyright 2019 David Bau. | MIT license */
!function(f,a,c){var s,l=256,p="random",d=c.pow(l,6),g=c.pow(2,52),y=2*g,h=l-1;function n(n,t,r){function e(){for(var n=u.g(6),t=d,r=0;n<g;)n=(n+r)*l,t*=l,r=u.g(1);for(;y<=n;)n/=2,t/=2,r>>>=1;return(n+r)/t}var o=[],i=j(function n(t,r){var e,o=[],i=typeof t;if(r&&"object"==i)for(e in t)try{o.push(n(t[e],r-1))}catch(n){}return o.length?o:"string"==i?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[n,S(a)]:null==n?function(){try{var n;return s&&(n=s.randomBytes)?n=n(l):(n=new Uint8Array(l),(f.crypto||f.msCrypto).getRandomValues(n)),S(n)}catch(n){var t=f.navigator,r=t&&t.plugins;return[+new Date,f,r,f.screen,S(a)]}}():n,3),o),u=new m(o);return e.int32=function(){return 0|u.g(4)},e.quick=function(){return u.g(4)/4294967296},e.double=e,j(S(u.S),a),(t.pass||r||function(n,t,r,e){return e&&(e.S&&v(e,u),n.state=function(){return v(u,{})}),r?(c[p]=n,t):n})(e,i,"global"in t?t.global:this==c,t.state)}function m(n){var t,r=n.length,u=this,e=0,o=u.i=u.j=0,i=u.S=[];for(r||(n=[r++]);e<l;)i[e]=e++;for(e=0;e<l;e++)i[e]=i[o=h&o+n[e%r]+(t=i[e])],i[o]=t;(u.g=function(n){for(var t,r=0,e=u.i,o=u.j,i=u.S;n--;)t=i[e=h&e+1],r=r*l+i[h&(i[e]=i[o=h&o+t])+(i[o]=t)];return u.i=e,u.j=o,r})(l)}function v(n,t){return t.i=n.i,t.j=n.j,t.S=n.S.slice(),t}function j(n,t){for(var r,e=n+"",o=0;o<e.length;)t[h&o]=h&(r^=19*t[h&o])+e.charCodeAt(o++);return S(t)}function S(n){return String.fromCharCode.apply(0,n)}if(j(c.random(),a),"object"==typeof module&&module.exports){module.exports=n;try{s=require("crypto")}catch(n){}}else"function"==typeof define&&define.amd?define(function(){return n}):c["seed"+p]=n}("undefined"!=typeof self?self:this,[],Math);
/*! console_hack.js | (c) 2015 Thomas Michael Edwards | Licensed under SugarCube's Simple BSD license */
!function(){for(var methods=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","table","time","timeEnd","timeline","timelineEnd","timeStamp","trace","warn"],length=methods.length,noop=function(){},console=window.console=window.console||{};length--;){var method=methods[length];console[method]||(console[method]=noop)}}();
}else{document.documentElement.setAttribute("data-init", "lacking");}
</script>
<style id="style-normalize" type="text/css">/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}</style>
<style id="style-init-screen" type="text/css">@-webkit-keyframes init-loading-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes init-loading-spin{0%{-o-transform:rotate(0);transform:rotate(0)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes init-loading-spin{0%{-webkit-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}#init-screen{display:none;z-index:500000;position:fixed;top:0;left:0;height:100%;width:100%;font:28px/1 Helmet,Freesans,sans-serif;font-weight:700;color:#eee;background-color:#111;text-align:center}#init-screen>div{display:none;position:relative;margin:0 auto;max-width:1136px;top:25%}html[data-init=lacking] #init-screen,html[data-init=loading] #init-screen,html[data-init=no-js] #init-screen{display:block}html[data-init=lacking] #init-lacking,html[data-init=no-js] #init-no-js{display:block;padding:0 1em}html[data-init=no-js] #init-no-js{color:red}html[data-init=loading] #init-loading{-webkit-animation:init-loading-spin 2s linear infinite;-o-animation:init-loading-spin 2s linear infinite;animation:init-loading-spin 2s linear infinite;border:12px solid transparent;border-bottom-color:#7f7f7f;border-radius:50%;border-top-color:#7f7f7f;display:block;height:100px;width:100px}html[data-init=loading] #init-loading>div{text-indent:16128px;overflow:hidden;white-space:nowrap}html[data-init=loading] #story,html[data-init=loading] #ui-bar{display:none!important}</style>
<style id="style-font-icons" type="text/css">@font-face{font-family:sc-icons;font-display:block;src:url("data:application/octet-stream;base64,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") format("woff")}</style>
<style id="style-font-emoji" type="text/css">@font-face{font-family:color-emoji;src:local("Twemoji Mozilla"),local("Apple Color Emoji"),local("Segoe UI Emoji"),local("Segoe UI Symbol"),local("Noto Color Emoji"),local("EmojiOne Color"),local("Android Emoji")}</style>
<style id="style-core" type="text/css">#store-area,tw-storydata{display:none!important;z-index:0}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-corner,::-webkit-scrollbar-track{background-color:#111}::-webkit-scrollbar-thumb{background-color:#333;border:1px solid #111}*{scrollbar-color:#333 #111;scrollbar-width:thin}:-webkit-full-screen{height:100%;width:100%}:-ms-fullscreen{height:100%;width:100%}:fullscreen{height:100%;width:100%}body::-ms-backdrop{background:0 0}:focus{outline:thin dotted}:disabled{cursor:not-allowed!important}html{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Cantarell,Ubuntu,"Helvetica Neue",Helvetica,Arial,sans-serif,color-emoji;font-size:16px;line-height:1}body{color:#eee;background-color:#111;overflow:auto}a{cursor:pointer;color:#68d;text-decoration:none;-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s}a:hover,html[data-outlines] a:focus{color:#8af;text-decoration:underline}a.link-broken{color:#c22}a.link-broken:hover,html[data-outlines] a.link-broken:focus{color:#e44}a[disabled],span.link-disabled{color:#aaa;cursor:not-allowed!important;text-decoration:none}a.link-internal{-webkit-touch-callout:none}area{cursor:pointer}button{cursor:pointer;color:#eee;background-color:#35a;border:1px solid #57c;line-height:normal;padding:.4em;-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}button:hover,html[data-outlines] button:focus{background-color:#57c;border-color:#79e}button:disabled{background-color:#444;border:1px solid #666}code,kbd,pre,samp,var{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Lucida Console","Courier New",Courier,monospace,monospace}pre{overflow:auto}input,select,textarea{color:#eee;background-color:transparent;border:1px solid #444;padding:.4em}select{padding:.34em .4em}input[type=text]{min-width:18em}textarea{min-width:30em;resize:vertical}input[type=checkbox],input[type=file],input[type=radio],select{cursor:pointer}input[type=range]{-webkit-appearance:none;min-height:1.2em}input[type=range]:focus{outline:0}input[type=range]::-webkit-slider-runnable-track{background:#222;border:1px solid #444;border-radius:0;cursor:pointer;height:10px;width:100%}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:#35a;border:1px solid #57c;border-radius:0;cursor:pointer;height:18px;margin-top:-5px;width:33px}input[type=range]:focus::-webkit-slider-runnable-track{background:#222}input[type=range]::-moz-range-track{background:#222;border:1px solid #444;border-radius:0;cursor:pointer;height:10px;width:100%}input[type=range]::-moz-range-thumb{background:#35a;border:1px solid #57c;border-radius:0;cursor:pointer;height:18px;width:33px}input[type=range]::-ms-track{background:0 0;border-color:transparent;color:transparent;cursor:pointer;height:10px;width:calc(100% - 1px)}input[type=range]::-ms-fill-lower{background:#222;border:1px solid #444;border-radius:0}input[type=range]::-ms-fill-upper{background:#222;border:1px solid #444;border-radius:0}input[type=range]::-ms-thumb{background:#35a;border:1px solid #57c;border-radius:0;cursor:pointer;height:16px;width:33px}html[data-outlines] input:focus,html[data-outlines] select:focus,html[data-outlines] textarea:focus,input:hover,select:hover,textarea:hover{background-color:#333;border-color:#eee}input:disabled,select:disabled,textarea:disabled{color:#333;background-color:transparent;border-color:#111}hr{display:block;height:1px;border:none;border-top:1px solid #eee;margin:1em 0;padding:0}audio,canvas,progress,video{max-width:100%;vertical-align:middle}.no-transition{-webkit-transition:none!important;-o-transition:none!important;transition:none!important}.error-view{background-color:#511;border-left:.5em solid #c22;display:inline-block;margin:.1em;max-width:100%;padding:0 .25em;position:relative}.error-view>.error-toggle{background-color:transparent;border:none;line-height:inherit;left:0;padding:0;position:absolute;top:0;width:1.75em}.error-view>.error-toggle:hover,html[data-outlines] .error-view>.error-toggle:focus{background-color:transparent}.error-view>.error{display:inline-block;margin-left:.25em}.error-view>.error-toggle+.error{margin-left:1.5em}.error-view>.error-source[hidden]{display:none}.error-view>.error-source:not([hidden]){background-color:rgba(0,0,0,.2);display:block;margin:0 0 .25em;overflow-x:auto;padding:.25em}.highlight,.marked{color:#ff0;font-weight:700;font-style:italic}.nobr{white-space:nowrap}.error-view>.error-toggle::before,.error-view>.error::before,[data-icon-after]::after,[data-icon-before]::before,[data-icon]::before,a.link-external::after{font-family:sc-icons!important;font-style:normal;font-weight:400;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[data-icon]::before{content:attr(data-icon)}[data-icon-before]::before{content:attr(data-icon-before);margin-right:.35em}[data-icon-after]::after{content:attr(data-icon-after);margin-left:.35em}.error-view>.error-toggle::before{content:"\f0da"}.error-view>.error-toggle.enabled::before{content:"\f0d7"}.error-view>.error::before{content:"\f071";margin-right:.35em}a.link-external::after{content:"\f35d";margin-left:.25em}</style>
<style id="style-core-display" type="text/css">#story{z-index:10;margin:2.5em}@media screen and (max-width:1136px){#story{margin-right:1.5em}}#passages{max-width:54em;margin:0 auto}</style>
<style id="style-core-passage" type="text/css">.passage{line-height:1.75;text-align:left;-webkit-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.passage-in{opacity:0}.passage ol,.passage ul{margin-left:.5em;padding-left:1.5em}.passage table{margin:1em 0;border-collapse:collapse;font-size:100%}.passage caption,.passage td,.passage th,.passage tr{padding:3px}@media (prefers-reduced-motion:reduce){.passage{-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}}</style>
<style id="style-core-macro" type="text/css">@-webkit-keyframes cursor-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}@-o-keyframes cursor-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}@keyframes cursor-blink{0%{opacity:1}50%{opacity:0}100%{opacity:1}}.macro-append-insert,.macro-linkappend-insert,.macro-linkprepend-insert,.macro-linkreplace-insert,.macro-prepend-insert,.macro-repeat-insert,.macro-replace-insert,.macro-timed-insert{-webkit-transition:opacity .4s ease-in;-o-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.macro-append-in,.macro-linkappend-in,.macro-linkprepend-in,.macro-linkreplace-in,.macro-prepend-in,.macro-repeat-in,.macro-replace-in,.macro-timed-in{opacity:0}.macro-type-cursor::after{-webkit-animation:cursor-blink 1s infinite;-o-animation:cursor-blink 1s infinite;animation:cursor-blink 1s infinite;content:"\2590";opacity:1}</style>
<style id="style-ui-dialog" type="text/css">html[data-dialog] body{overflow:hidden}#ui-overlay{background-color:#000;height:200%;left:-50%;opacity:0;position:fixed;top:-50%;-webkit-transition:visibility .2s step-end,opacity .2s ease-in;-o-transition:visibility .2s step-end,opacity .2s ease-in;transition:visibility .2s step-end,opacity .2s ease-in;visibility:hidden;width:200%;z-index:100000}#ui-overlay.open{opacity:.8;-webkit-transition:visibility 0s;-o-transition:visibility 0s;transition:visibility 0s;visibility:visible}#ui-dialog{display:none;margin:0;max-width:66em;opacity:0;padding:0;position:fixed;top:50px;z-index:100100}#ui-dialog.open{display:block;opacity:1;-webkit-transition:opacity .2s ease-in;-o-transition:opacity .2s ease-in;transition:opacity .2s ease-in}#ui-dialog>*{-webkit-box-sizing:border-box;box-sizing:border-box}#ui-dialog-titlebar{background-color:#444;min-height:24px;position:relative}#ui-dialog-title{font-size:1.5em;margin:0;padding:.2em 3.5em .2em .5em;text-align:center;text-transform:uppercase}#ui-dialog-close{background-color:transparent;border:1px solid transparent;cursor:pointer;display:block;font-size:120%;height:92%;margin:0;padding:0;position:absolute;right:0;top:0;-webkit-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;width:3.6em;font-family:sc-icons!important;font-style:normal;font-weight:400;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#ui-dialog-close:hover{background-color:#b44;border-color:#d66}#ui-dialog-body{background-color:#111;border:1px solid #444;height:calc(100% - 2.1em);line-height:1.5;min-width:300px;overflow:auto;padding:1em;text-align:left}#ui-dialog-body>:first-child{margin-top:0}#ui-dialog-body hr{background-color:#444}#ui-dialog-body ul.buttons{margin:0;padding:0;list-style:none}#ui-dialog-body ul.buttons li{display:inline-block;margin:0;padding:.4em .4em 0 0}#ui-dialog-body ul.buttons>li+li>button{margin-left:1em}@media (prefers-reduced-motion:reduce){#ui-overlay{-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}#ui-overlay.open{-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}#ui-dialog.open{-webkit-transition:opacity 0s;-o-transition:opacity 0s;transition:opacity 0s}}</style>
<style id="style-ui-dialog-saves" type="text/css">#ui-dialog-body.saves{padding:0 0 1px}#ui-dialog-body.saves>:not(:first-child){border-top:1px solid #444}#ui-dialog-body.saves>h2{background-color:#222;font-size:inherit;margin:0;padding:.1em 0 .1em .4em}#ui-dialog-body.saves table{border-spacing:0;width:100%}#ui-dialog-body.saves tr:not(:first-child){border-top:1px solid #444}#ui-dialog-body.saves td{padding:.33em}#ui-dialog-body.saves td:first-child{display:none!important}#ui-dialog-body.saves td:nth-child(3){line-height:1.2;width:100%}#ui-dialog-body.saves td:last-child{text-align:right}#ui-dialog-body.saves .empty{color:#999;speak:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#ui-dialog-body.saves .details{font-size:75%;margin-left:.25em}#ui-dialog-body.saves #saves-list button{color:#eee;background-color:transparent;border:1px solid #444;height:2.237em;width:2.237em}#ui-dialog-body.saves #saves-list button:disabled{color:#444;border-color:#444}#ui-dialog-body.saves #saves-list button:not(:disabled):hover{background-color:#222;border-color:#ddd}#ui-dialog-body.saves #saves-list button.delete:not(:disabled),#ui-dialog-body.saves button[id=saves-clear]:not(:disabled){background-color:#911;border-color:#b33}#ui-dialog-body.saves #saves-list button.delete:not(:disabled):hover,#ui-dialog-body.saves button[id=saves-clear]:not(:disabled):hover{background-color:#b33;border-color:#d55}#ui-dialog-body.saves #saves-list button.load:not(:disabled){background-color:#161;border-color:#383}#ui-dialog-body.saves #saves-list button.load:not(:disabled):hover{background-color:#383;border-color:#5a5}#ui-dialog-body.saves .buttons li{padding:.4em}#ui-dialog-body.saves .buttons>li+li>button{margin-left:.2em}#ui-dialog-body.saves .buttons.slots>li:last-child{float:right}#ui-dialog-body.saves #saves-list button::before,#ui-dialog-body.saves .buttons button::before{font-family:sc-icons!important;font-style:normal;font-weight:400;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#ui-dialog-body.saves .buttons button::before{margin-right:.35em}#ui-dialog-body.saves button.delete::before{content:"\f2ed"}#ui-dialog-body.saves button.delete:disabled::before{content:"\f1f8"}#ui-dialog-body.saves button.load::before{content:"\f04b"}#ui-dialog-body.saves button.save::before{content:"\f0c7"}#ui-dialog-body.saves button[id=saves-export]::before{content:"\f56e"}#ui-dialog-body.saves button[id=saves-import]::before{content:"\f56f"}#ui-dialog-body.saves button[id=saves-clear]::before{content:"\f2ed"}#ui-dialog-body.saves button[id=saves-clear]:disabled::before{content:"\f1f8"}#ui-dialog-body.saves button[id=saves-disk-save]::before{content:"\f56d"}#ui-dialog-body.saves button[id=saves-disk-load]::before{content:"\f574"}</style>
<style id="style-ui-dialog-settings" type="text/css">#ui-dialog-body.settings [id|=setting-body]>div:first-child{display:table;width:100%}#ui-dialog-body.settings [id|=setting-label]{display:table-cell;padding:.4em 2em .4em 0}#ui-dialog-body.settings [id|=setting-label]+div{display:table-cell;min-width:8em;text-align:right;vertical-align:middle;white-space:nowrap}#ui-dialog-body.settings div[id|=header-body]{margin:1em 0}#ui-dialog-body.settings div[id|=header-body]:first-child{margin-top:0}#ui-dialog-body.settings div[id|=header-body]:not(:first-child){border-top:1px solid #444;padding-top:1em}#ui-dialog-body.settings div[id|=header-body]>*{margin:0}#ui-dialog-body.settings h2[id|=header-heading]{font-size:1.375em}#ui-dialog-body.settings p[id|=header-desc],#ui-dialog-body.settings p[id|=setting-desc]{font-size:87.5%;margin:0 0 0 .5em}#ui-dialog-body.settings div[id|=setting-body]+div[id|=setting-body]{margin:1em 0}#ui-dialog-body.settings [id|=setting-control]{white-space:nowrap}#ui-dialog-body.settings button[id|=setting-control]{color:#eee;background-color:transparent;border:1px solid #444;padding:.4em}#ui-dialog-body.settings button[id|=setting-control]:hover{background-color:#333;border-color:#eee}#ui-dialog-body.settings button[id|=setting-control].enabled{background-color:#282;border-color:#4a4}#ui-dialog-body.settings button[id|=setting-control].enabled:hover{background-color:#4a4;border-color:#6c6}#ui-dialog-body.settings input[type=range][id|=setting-control]{max-width:35vw}#ui-dialog-body.settings span[id|=setting-input]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#ui-dialog-body.settings button[id|=setting-control].enabled::after,#ui-dialog-body.settings button[id|=setting-control]::after{font-family:sc-icons!important;font-style:normal;font-weight:400;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-left:.35em}#ui-dialog-body.settings button[id|=setting-control]::after{content:"\f204"}#ui-dialog-body.settings button[id|=setting-control].enabled::after{content:"\f205"}</style>
<style id="style-ui-dialog-legacy" type="text/css">#ui-dialog-body.list{padding:0}#ui-dialog-body.list ul{margin:0;padding:0;list-style:none;border:1px solid transparent}#ui-dialog-body.list li{margin:0}#ui-dialog-body.list li:not(:first-child){border-top:1px solid #444}#ui-dialog-body.list li a{display:block;padding:.25em .75em;border:1px solid transparent;color:#eee;text-decoration:none}#ui-dialog-body.list li a:hover{background-color:#333;border-color:#eee}#ui-dialog-body.list a{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}</style>
<style id="style-ui-bar" type="text/css">#story{margin-left:20em;-webkit-transition:margin-left .2s ease-in;-o-transition:margin-left .2s ease-in;transition:margin-left .2s ease-in}#ui-bar.stowed~#story{margin-left:4.5em}@media screen and (max-width:1136px){#story{margin-left:19em}#ui-bar.stowed~#story{margin-left:3.5em}}@media screen and (max-width:768px){#story{margin-left:3.5em}}#ui-bar{background-color:#222;border-right:1px solid #444;height:100%;left:0;margin:0;padding:0;position:fixed;text-align:center;top:0;-webkit-transition:left .2s ease-in;-o-transition:left .2s ease-in;transition:left .2s ease-in;width:17.5em;z-index:50}#ui-bar.stowed{left:-15.5em}#ui-bar-tray{position:absolute;top:.2em;left:0;right:0}#ui-bar-body{height:calc(100% - 2.5em);line-height:1.5;margin:2.5em 0;overflow:auto;padding:0 1.5em}#ui-bar.stowed #ui-bar-body,#ui-bar.stowed #ui-bar-history{visibility:hidden;-webkit-transition:visibility .2s step-end;-o-transition:visibility .2s step-end;transition:visibility .2s step-end}#ui-bar a{text-decoration:none}#ui-bar hr{border-color:#444}#ui-bar-tray button{color:#eee;background-color:transparent;border:1px solid #444}#ui-bar-tray button:hover{background-color:#444;border-color:#eee}#ui-bar-tray button:disabled{color:#444;background-color:transparent;border-color:#444}button#ui-bar-toggle{border-right:none;position:absolute;right:0;top:0}#ui-bar-history{margin:0 auto}#ui-bar-history button:not(:first-child){margin-left:1.2em}#ui-bar-body>:not(:first-child){margin-top:2em}#story-title{margin:0;font-size:162.5%}#story-author{margin-top:2em;font-weight:700}#menu ul{margin:1em 0 0;padding:0;list-style:none;border:1px solid #444}#menu ul:empty{display:none}#menu li{margin:0}#menu li:not(:first-child){border-top:1px solid #444}#menu li a{display:block;padding:.25em .75em;border:1px solid transparent;color:#eee;text-transform:uppercase}#menu li a:hover{background-color:#444;border-color:#eee}#menu a,#ui-bar-tray button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#menu-core li[id|=menu-item] a::before,#ui-bar-tray button::before{font-family:sc-icons!important;font-style:normal;font-weight:400;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#ui-bar-tray button::before{display:block;font-size:1.1em;width:1em}#ui-bar-toggle::before{content:"\f053"}#ui-bar.stowed #ui-bar-toggle::before{content:"\f054"}#ui-bar-tray #history-backward::before{content:"\f060"}#ui-bar-tray #history-jumpto::before{content:"\f0e7"}#ui-bar-tray #history-forward::before{content:"\f061"}#menu-item-continue a::before,#menu-item-restart a::before,#menu-item-saves a::before,#menu-item-settings a::before,#menu-item-share a::before{margin-right:.35em}#menu-item-continue a::before{content:"\f04b"}#menu-item-saves a::before{content:"\f0c7"}#menu-item-settings a::before{content:"\f013"}#menu-item-restart a::before{content:"\f011"}#menu-item-share a::before{content:"\f1e0"}@media (prefers-reduced-motion:reduce){#story{-webkit-transition:margin-left 0s;-o-transition:margin-left 0s;transition:margin-left 0s}#ui-bar{-webkit-transition:left 0s;-o-transition:left 0s;transition:left 0s}}</style>
<style id="style-ui-debug-bar" type="text/css">#debug-bar{background-color:#222;border-left:1px solid #444;border-top:1px solid #444;bottom:0;margin:0;max-height:95%;max-width:66em;min-width:300px;padding:.5em;position:fixed;right:0;z-index:99900}#debug-bar>div:not([id])+div{margin-top:.5em}#debug-bar>div>label{margin-right:.5em}#debug-bar>div>input[type=text]{min-width:8em;width:14em}#debug-bar>div>select{width:22em}#debug-bar-toggle{color:#eee;background-color:#222;border:1px solid #444;height:calc(100% + 1px);left:calc(-2em - 1px);position:absolute;top:-1px;width:2em}#debug-bar-toggle:hover{background-color:#333;border-color:#eee}#debug-bar-hint{bottom:.75em;font-size:4.5em;opacity:.33;pointer-events:none;position:fixed;right:.6em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}#debug-bar-watch{background-color:#222;border-left:1px solid #444;border-top:1px solid #444;bottom:calc(100% + 1px);font-size:.9em;left:-1px;max-height:280%;max-height:calc(95vh - 100%);position:absolute;overflow-x:hidden;overflow-y:scroll;right:0;z-index:99800}#debug-bar-watch[hidden]{display:none}#debug-bar-watch div{color:#999;font-style:italic;margin:1em auto;text-align:center}#debug-bar-watch table{width:100%}#debug-bar-watch tr:nth-child(2n){background-color:rgba(127,127,127,.15)}#debug-bar-watch td{padding:.2em 0}#debug-bar-watch td:first-child+td{padding:.2em .3em .2em .1em}#debug-bar-watch .watch-delete{background-color:transparent;border:none;color:#c00}#debug-bar-watch-all,#debug-bar-watch-clear{margin-left:.5em}#debug-bar-views-toggle,#debug-bar-watch-toggle{color:#eee;background-color:transparent;border:1px solid #444;margin-right:1em;padding:.4em}#debug-bar-views-toggle:hover,#debug-bar-watch-toggle:hover{background-color:#333;border-color:#eee}#debug-bar-watch:not([hidden])~div #debug-bar-watch-toggle,html[data-debug-view] #debug-bar-views-toggle{background-color:#282;border-color:#4a4}#debug-bar-watch:not([hidden])~div #debug-bar-watch-toggle:hover,html[data-debug-view] #debug-bar-views-toggle:hover{background-color:#4a4;border-color:#6c6}#debug-bar-hint::after,#debug-bar-passage-play::before,#debug-bar-toggle::before,#debug-bar-views-toggle::after,#debug-bar-watch .watch-delete::before,#debug-bar-watch-add::before,#debug-bar-watch-all::before,#debug-bar-watch-clear::before,#debug-bar-watch-toggle::after{font-family:sc-icons!important;font-style:normal;font-weight:400;font-variant:normal;line-height:1;speak:never;text-rendering:auto;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#debug-bar-toggle::before{content:"\f188"}#debug-bar-hint::after{content:"\f188\202f\f061"}#debug-bar-watch .watch-delete::before{content:"\f00d"}#debug-bar-watch-add::before{content:"\f067"}#debug-bar-watch-all::before{content:"\f0d0"}#debug-bar-watch-clear::before{content:"\f2ed"}#debug-bar-views-toggle::after,#debug-bar-watch-toggle::after{content:"\f204";margin-left:.35em}#debug-bar-watch:not([hidden])~div #debug-bar-watch-toggle::after,html[data-debug-view] #debug-bar-views-toggle::after{content:"\f205"}#debug-bar-passage-play::before{content:"\f04b"}</style>
<style id="style-ui-debug-views" type="text/css">html[data-debug-view] .debug{padding:.25em;background-color:#234}html[data-debug-view] .debug[title]{cursor:help}html[data-debug-view] .debug.block{display:inline-block;vertical-align:middle}html[data-debug-view] .debug.invalid{text-decoration:line-through}html[data-debug-view] .debug.hidden,html[data-debug-view] .debug.hidden .debug{background-color:#555}html:not([data-debug-view]) .debug.hidden{display:none}html[data-debug-view] .debug[data-name][data-type].nonvoid::after,html[data-debug-view] .debug[data-name][data-type]::before{background-color:rgba(0,0,0,.25);font-family:monospace,monospace;white-space:pre}html[data-debug-view] .debug[data-name][data-type]::before{content:attr(data-name)}html[data-debug-view] .debug[data-name][data-type|=macro]::before{content:"<<" attr(data-name) ">>"}html[data-debug-view] .debug[data-name][data-type|=macro].nonvoid::after{content:"<</" attr(data-name) ">>"}html[data-debug-view] .debug[data-name][data-type|=html]::before{content:"<" attr(data-name) ">"}html[data-debug-view] .debug[data-name][data-type|=html].nonvoid::after{content:"</" attr(data-name) ">"}html[data-debug-view] .debug[data-name][data-type]:not(:empty)::before{margin-right:.25em}html[data-debug-view] .debug[data-name][data-type].nonvoid:not(:empty)::after{margin-left:.25em}html[data-debug-view] .debug[data-name][data-type|=special],html[data-debug-view] .debug[data-name][data-type|=special]::before{display:block}</style>
</head>
<body>
	<div id="init-screen">
		<div id="init-no-js"><noscript>JavaScript must be enabled to play.</noscript></div>
		<div id="init-lacking"><p>Browser lacks capabilities required to play.</p><p>Upgrade or switch to another browser.</p></div>
		<div id="init-loading"><div>Loading&hellip;</div></div>
	</div>
	<tw-storydata name="丧尸研究专门所 " startnode="1" creator="Twine" creator-version="2.9.2" format="SugarCube" format-version="2.37.3" ifid="5B694F48-685F-42B0-AF95-2EF96994F094" options="" tags="" zoom="0.3" hidden><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css">#passages {
    color: #ABF62D
      /*字*/}

#passages a {
    color: #FF006F
      /*链接*/}

#passages h1, #passages h2 {
    color: #
      /*标题*/}

/*背景*/
html, body {
  height: 100%;
  margin: 0;
}

body {
  background: linear-gradient(to bottom, #000000 0%, #000000 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}</style><script role="script" id="twine-user-script" type="text/twine-javascript"></script><tw-passagedata pid="1" name="丧尸研究专门所" tags="" position="675,150" size="100,100">&lt;h1&gt;丧尸研究专门所&lt;/h1&gt;作为研究所博士的你身付重任。
治疗丧尸的重大任务，人类的未来，就交给你了！

警告:内含刺激性内容。

提示:一共有六个结局，你想全都收集吗？

[[开始游戏|丧尸]]
&lt;&lt;set $zbes = 0&gt;&gt; &lt;&lt;set $zb1 =0&gt;&gt; &lt;&lt;set $zb2 =0&gt;&gt; &lt;&lt;set $zb3 =0&gt;&gt;</tw-passagedata><tw-passagedata pid="2" name="丧尸" tags="" position="675,275" size="100,100">&lt;&lt;if $zbes lte 9&gt;&gt;被困在钢化玻璃后的丧尸在咆哮，唾沫飞溅。

请选择你对它的施行的治疗方式，一回合相当游戏中一年时间。
十回合后结算。

目前回合:$zbes

[[解刨重造]] 尝试了$zb1次
[[灌输晶核]] 尝试了$zb2次
[[尝试聊天]] 尝试了$zb3次&lt;&lt;/if&gt;&gt;&lt;&lt;if $zbes gt 9&gt;&gt;多年的研究，终于要得出结果了…

[[继续|成果]]
&lt;&lt;/if&gt;&gt;</tw-passagedata><tw-passagedata pid="3" name="解刨重造" tags="" position="550,400" size="100,100">你把它拆开，重组。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;if $bromo== 1&gt;&gt;
它在手术台上激烈挣扎，你不了解它是不是已经恢复了人类的意识。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 2&gt;&gt;
它还是原来的它吗？你也不太清楚了。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 3&gt;&gt;
内脏。皮肤。血液。通通换新。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 4&gt;&gt;
它的血液在沸腾。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 5&gt;&gt;
它在咆哮。&lt;&lt;/if&gt;&gt;

[[继续|丧尸]]
&lt;&lt;set $zb1 +=1&gt;&gt;
&lt;&lt;set $zbes +=1&gt;&gt;</tw-passagedata><tw-passagedata pid="4" name="灌输晶核" tags="" position="675,400" size="100,100">你正在给它灌输晶核。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;if $bromo== 1&gt;&gt;
你认为它越发具有人性化了…这是错觉吗？
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 2&gt;&gt;
它逐渐脱离了僵硬的活动。
进化是种新方向吗？
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 3&gt;&gt;
你在它的脸上看到了些表情上的变化。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 4&gt;&gt;
它在咆哮，但声音很低。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 5&gt;&gt;
它不再面无血色。&lt;&lt;/if&gt;&gt;

[[继续|丧尸]]
&lt;&lt;set $zb2 +=1&gt;&gt;
&lt;&lt;set $zbes +=1&gt;&gt;</tw-passagedata><tw-passagedata pid="5" name="尝试聊天" tags="" position="800,400" size="100,100">你尝试和它对话。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;if $bromo== 1&gt;&gt;
它在发出毫无意义的吼叫。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 2&gt;&gt;
它在咆哮，就像是在回应你。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 3&gt;&gt;
它在嘶吼，你怀疑它的声带已经遭受到严重的损坏。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 4&gt;&gt;
它毫无反应，你怀疑它在听。
&lt;&lt;set $bromo= random(1,5)&gt;&gt; &lt;&lt;elseif $bromo== 5&gt;&gt;
它在抓挠玻璃，在钢化玻璃留下鲜红的抓痕。&lt;&lt;/if&gt;&gt;

[[继续|丧尸]]
&lt;&lt;set $zb3 +=1&gt;&gt;&lt;&lt;set $zbes +=1&gt;&gt;</tw-passagedata><tw-passagedata pid="6" name="成果" tags="" position="1475,275" size="100,100">你为了拯救它，全人类的命运，付出了大量精力，十年，足足十年。

那么，如今的结果是…

你站在铁闸前深呼一口气。
那么，开门吧。

&lt;&lt;if $zb1 eq 10&gt;&gt;[[结局1|人归来]]&lt;&lt;/if&gt;&gt; &lt;&lt;if $zb2 eq 10&gt;&gt;[[结局2|怪物]]&lt;&lt;/if&gt;&gt; &lt;&lt;if $zb3 eq 10&gt;&gt;[[结局3|腐败丧尸]]&lt;&lt;/if&gt;&gt; &lt;&lt;if $zb1 eq 5 and $zb3 eq 5&gt;&gt;[[结局4|半丧尸]]&lt;&lt;/if&gt;&gt; &lt;&lt;if $zb2 eq 5 and $zb3 eq 5&gt;&gt;[[结局5|饲养者]]&lt;&lt;/if&gt;&gt; &lt;&lt;if $zb1 eq 5 and $zb2 eq 5&gt;&gt;[[结局6|原丧尸]]&lt;&lt;/if&gt;&gt; &lt;&lt;if $zb1 neq 5 and $zb3 neq 5 or $zb2 neq 5 and $zb3 neq 5 or $zb1 neq 5 and $zb2 neq 5&gt;&gt; &lt;&lt;if $zb1 neq 10 and $zb2 neq 10 and $zb3 neq 10&gt;&gt;[[结局3|腐败丧尸]] &lt;&lt;/if&gt;&gt;  &lt;&lt;/if&gt;&gt; </tw-passagedata><tw-passagedata pid="7" name="人归来" tags="" position="1150,400" size="100,100">你看着被捆绑在实验台上的丧尸很安静。

青白色的眼膜褪下，你在它的脸上没看到狰狞，它目不转睛凝视着你的身影。

“你…”，它张口，“你是谁？”

它已然不是你印象中的模样，你对它进行大量改造，器官、血液，肌肤…

你甚至能够看到它颈上的缝合线。
它，还是原来的它吗？

你双手插兜，低笑了声，抬头，“我是你的爱人。”

……

[[结束|丧尸研究专门所]]</tw-passagedata><tw-passagedata pid="8" name="怪物" tags="" position="1275,400" size="100,100">你打开了门。
&lt;&lt;type 50ms&gt;&gt;手术台上却空一无人。

不…它在哪？

头顶隐约的湿润触感吸引了你的注意。
你缓缓抬头。

操。
这是你脑海里最后的念头。

四肢纤细、瘦削的怪物攀爬在天花板上，过盛的口水滴下。

是你亲手培养出了这样的怪物…

咔嚓。

无头尸体倒下。

[[结束|丧尸研究专门所]]&lt;&lt;/type&gt;&gt;</tw-passagedata><tw-passagedata pid="9" name="腐败丧尸" tags="" position="1400,400" size="100,100">你才刚推开门。

浓烈的腐臭让你不止反胃，胃酸反涌，万幸的是你胃里几乎没什么，只有溢出到舌根的胃酸。

它彻底烂了。
骨头上架着些残剩不多的皮肉。

你十年都花在它身上，如今毫无意义。

哪怕你想尽办法缓解它的腐败，用尽手段也没用。

好吧，再见。
我的老朋友。

[[结束|丧尸研究专门所]]</tw-passagedata><tw-passagedata pid="10" name="半丧尸" tags="" position="1525,400" size="100,100">被捆绑在手术台上的丧尸时而咆哮，时而沉默。

它显然没能完全恢复理智。

“过得怎么样？”，你说，略为亲近地问候。

丧尸嗅到人的气息，疯狂挣扎起来，过了好一会才平静，唾液从它的嘴角流下，只能发出些含糊不清的沙哑声音，“痛…好痛……杀了我…”

“不，你可是我最成功的实验品。”，你拍拍它丧失弹性的脸颊，猛然缩手，“不，不准咬我。”

日子还长着呢。

[[结束|丧尸研究专门所]]</tw-passagedata><tw-passagedata pid="11" name="饲养者" tags="" position="1650,400" size="100,100">你推门而入，却落入一个冰冷的怀抱。

“怎么这么爱撒娇？”，你哄笑道，指尖戳向它的胸膛，把它戳开了。

它有半张脸腐烂了，另外半边完好的也做不出太多表情，你却看得出它好像有点委屈，故意装可怜，“…饿。”

在你的教导下，它总算学会了点人类的言语。

但你不能完全将它当成人来看待，两者本质上是不相同的。

“在这。”，你提着一个铁桶，里面盛满红肉。

你用夹子夹起块，在它面前晃晃，它就跪好了，仰着头蹭你的腿。

可以说，如今你是它的饲养者。

只要，给你更多时间，总有一天，你能够……

[[结束|丧尸研究专门所]]</tw-passagedata><tw-passagedata pid="12" name="原丧尸" tags="" position="1775,400" size="100,100">你提着一个铁桶，里面盛满红肉，几乎满溢。

实验台上赤裸的丧尸难掩缝合线，虽因晶核影响产生了些异变，但在你的手术下，保持了良好的人形态。

得益丧尸不会死亡的特性，你在它的身上进行了许多次诚验。
你粗暴将红肉塞进它的嘴里，这能大大延缓它的腐败。

你认为，为了大多数，小部分的牺牲是必须的。

你取出针管，里面是一管血清，缓缓推入它的体内…

至于结局？
无人得知。

[[结束|丧尸研究专门所]]</tw-passagedata><tw-passagedata pid="13" name="StoryDisplayTitle" tags="" position="550,725" size="100,100">丧尸研究专门所</tw-passagedata></tw-storydata>
	<script id="script-sugarcube" type="text/javascript">
	/*! SugarCube JS */
	if(document.documentElement.getAttribute("data-init")==="loading"){(function(window,document,jQuery,undefined){"use strict";var _excluded=["bubbles","cancelable","composed","detail"],_excluded2=["bubbles","cancelable"],_excluded3=["state"];function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function _objectWithoutProperties(e,t){if(null==e)return{};var o,r,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)o=s[r],t.includes(o)||{}.propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}function _objectWithoutPropertiesLoose(r,e){if(null==r)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var errorPrologRegExp=/^(?:(?:uncaught\s+(?:exception:\s+)?)?\w*(?:error|exception|_err):\s+)+/i,Alert=function(){function mesg(where,error,isFatal,isUncaught){var mesg="Error",nice="A".concat(isFatal?" fatal":"n"," error has occurred.");nice+=isFatal?" Aborting.":" You may be able to continue, but some parts may not work properly.";var isObject=null!==error&&"object"===_typeof(error),what=(isObject&&"message"in error?String(error.message).replace(errorPrologRegExp,""):String(error)).trim()||"unknown error";null!=where&&(mesg+=" [".concat(where,"]")),mesg+=": ".concat(what,"."),isObject&&"stack"in error&&(mesg+="\n\nStack Trace:\n".concat(error.stack)),mesg&&(nice+="\n\n".concat(mesg)),isUncaught||console[isFatal?"error":"warn"](mesg),window.alert(nice)}var origOnError;return origOnError=window.onerror,window.onerror=function(what,source,lineNum,colNum,error){"complete"===document.readyState?mesg(null,null!=error?error:what,!1,!0):(mesg(null,null!=error?error:what,!0,!0),window.onerror=origOnError,"function"==typeof window.onerror&&window.onerror.apply(this,arguments))},Object.preventExtensions(Object.create(null,{error:{value:function(where,error){mesg(where,error)}},fatal:{value:function(where,error){mesg(where,error,!0)}}}))}(),Patterns=(wsMap=new Map([[" ","\\u0020"],["\f","\\f"],["\n","\\n"],["\r","\\r"],["\t","\\t"],["\v","\\v"],[" ","\\u00a0"],[" ","\\u1680"],["᠎","\\u180e"],[" ","\\u2000"],[" ","\\u2001"],[" ","\\u2002"],[" ","\\u2003"],[" ","\\u2004"],[" ","\\u2005"],[" ","\\u2006"],[" ","\\u2007"],[" ","\\u2008"],[" ","\\u2009"],[" ","\\u200a"],["\u2028","\\u2028"],["\u2029","\\u2029"],[" ","\\u202f"],[" ","\\u205f"],["　","\\u3000"],["\ufeff","\\ufeff"]]),wsRe=/^\s$/,missing="",wsMap.forEach((function(pat,char){wsRe.test(char)||(missing+=pat)})),space=missing?"[\\s".concat(missing,"]"):"\\s",spaceNoTerminator="[\\u0020\\f\\t\\v\\u00a0\\u1680\\u180e\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff]",notSpace="\\s"===space?"\\S":space.replace(/^\[/,"[^"),anyChar="(?:.|".concat("[\\n\\r\\u2028\\u2029]",")"),anyLetter="[0-9A-Z_a-z\\-\\u00c0-\\u00d6\\u00d8-\\u00f6\\u00f8-\\u00ff\\u0150\\u0170\\u0151\\u0171]",anyLetterStrict=anyLetter.replace("\\-",""),identifier="".concat("[$A-Z_a-z]").concat("[$0-9A-Z_a-z]","*"),variable="[$_]"+identifier,htmlTagName="[A-Za-z](?:".concat(cENChar="(?:[\\x2D.0-9A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])","*-").concat(cENChar,"*|[0-9A-Za-z]*)"),twStyle="(".concat(anyLetter,"+)\\(([^\\)\\|\\n]+)\\):"),cssStyle="".concat(spaceNoTerminator,"*(").concat(anyLetter,"+)").concat(spaceNoTerminator,"*:([^;\\|\\n]+);"),idOrClass="".concat(spaceNoTerminator,"*((?:").concat("[#.]").concat(anyLetter,"+").concat(spaceNoTerminator,"*)+);"),inlineCss="".concat(twStyle,"|").concat(cssStyle,"|").concat(idOrClass),url="(?:file|https?|mailto|ftp|javascript|irc|news|data):[^\\s'\"]+",externalUrl=url.replace(/\|javascript|\|data/g,""),Object.freeze(Object.assign(Object.create(null),{space:space,spaceNoTerminator:spaceNoTerminator,lineTerminator:"[\\n\\r\\u2028\\u2029]",notSpace:notSpace,anyChar:anyChar,anyLetter:anyLetter,anyLetterStrict:anyLetterStrict,identifierFirstChar:"[$A-Z_a-z]",identifierNextChar:"[$0-9A-Z_a-z]",identifier:identifier,variableSigil:"[$_]",variable:variable,macroName:"[A-Za-z][\\w-]*|[=-]",templateName:"[A-Za-z][\\w-]*",htmlTagName:htmlTagName,cssIdOrClassSigil:"[#.]",cssImage:"\\[[<>]?[Ii][Mm][Gg]\\[(?:\\s|\\S)*?\\]\\]+",inlineCss:inlineCss,url:url,externalUrl:externalUrl}))),wsMap,wsRe,missing,cENChar,twStyle,cssStyle,idOrClass,space,spaceNoTerminator,notSpace,anyChar,anyLetter,anyLetterStrict,identifier,variable,htmlTagName,inlineCss,url,externalUrl;!function(){var startWSRe,endWSRe,_trimString=(startWSRe=new RegExp("^".concat(Patterns.space).concat(Patterns.space,"*")),endWSRe=new RegExp("".concat(Patterns.space).concat(Patterns.space,"*$")),function(str,where){var val=String(str);if(!val)return val;switch(where){case"start":return startWSRe.test(val)?val.replace(startWSRe,""):val;case"end":return endWSRe.test(val)?val.replace(endWSRe,""):val;default:throw new Error('_trimString called with incorrect where parameter value: "'.concat(where,'"'))}});function _createPadString(length,padding){var targetLength=Number.parseInt(length,10)||0;if(targetLength<1)return"";var padString=void 0===padding?"":String(padding);for(""===padString&&(padString=" ");padString.length<targetLength;){var curPadLength=padString.length,remainingLength=targetLength-curPadLength;padString+=curPadLength>remainingLength?padString.slice(0,remainingLength):padString}return padString.length>targetLength&&(padString=padString.slice(0,targetLength)),padString}if(Array.prototype.flat||Object.defineProperty(Array.prototype,"flat",{configurable:!0,writable:!0,value:function flat(){if(null==this)throw new TypeError("Array.prototype.flat called on null or undefined");var depth=0===arguments.length?1:Number(arguments[0])||0;if(depth<1)return Array.prototype.slice.call(this);var push=Array.prototype.push;return Array.prototype.reduce.call(this,(function(acc,cur){return cur instanceof Array?push.apply(acc,flat.call(cur,depth-1)):acc.push(cur),acc}),[])}}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,"flatMap",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.flatMap called on null or undefined");return Array.prototype.map.apply(this,arguments).flat()}}),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");if(0===arguments.length)return!1;var length=this.length>>>0;if(0===length)return!1;var needle=arguments[0],i=Number(arguments[1])||0;for(i<0&&(i=Math.max(0,length+i));i<length;++i){var value=this[i];if(value===needle||value!=value&&needle!=needle)return!0}return!1}}),Object.entries||Object.defineProperty(Object,"entries",{configurable:!0,writable:!0,value:function(obj){if("object"!==_typeof(obj)||null===obj)throw new TypeError("Object.entries object parameter must be an object");return Object.keys(obj).map((function(key){return[key,obj[key]]}))}}),Object.fromEntries||Object.defineProperty(Object,"fromEntries",{configurable:!0,writable:!0,value:function(iter){return Array.from(iter).reduce((function(acc,pair){if(Object(pair)!==pair)throw new TypeError("Object.fromEntries iterable parameter must yield objects");return pair[0]in acc?Object.defineProperty(acc,pair[0],{configurable:!0,enumerable:!0,writable:!0,value:pair[1]}):acc[pair[0]]=pair[1],acc}),{})}}),Object.getOwnPropertyDescriptors||Object.defineProperty(Object,"getOwnPropertyDescriptors",{configurable:!0,writable:!0,value:function(obj){if(null==obj)throw new TypeError("Object.getOwnPropertyDescriptors object parameter is null or undefined");var O=Object(obj);return Reflect.ownKeys(O).reduce((function(acc,key){var desc=Object.getOwnPropertyDescriptor(O,key);return void 0!==desc&&(key in acc?Object.defineProperty(acc,key,{configurable:!0,enumerable:!0,writable:!0,value:desc}):acc[key]=desc),acc}),{})}}),!Object.hasOwn){var _hasOwnProperty=Object.prototype.hasOwnProperty;Object.defineProperty(Object,"hasOwn",{configurable:!0,writable:!0,value:function(O,P){return _hasOwnProperty.call(Object(O),P)}})}Object.values||Object.defineProperty(Object,"values",{configurable:!0,writable:!0,value:function(obj){if("object"!==_typeof(obj)||null===obj)throw new TypeError("Object.values object parameter must be an object");return Object.keys(obj).map((function(key){return obj[key]}))}}),String.prototype.padStart||Object.defineProperty(String.prototype,"padStart",{configurable:!0,writable:!0,value:function(length,padding){if(null==this)throw new TypeError("String.prototype.padStart called on null or undefined");var baseString=String(this),baseLength=baseString.length,targetLength=Number.parseInt(length,10);return targetLength<=baseLength?baseString:_createPadString(targetLength-baseLength,padding)+baseString}}),String.prototype.padEnd||Object.defineProperty(String.prototype,"padEnd",{configurable:!0,writable:!0,value:function(length,padding){if(null==this)throw new TypeError("String.prototype.padEnd called on null or undefined");var baseString=String(this),baseLength=baseString.length,targetLength=Number.parseInt(length,10);return targetLength<=baseLength?baseString:baseString+_createPadString(targetLength-baseLength,padding)}}),String.prototype.trimStart||Object.defineProperty(String.prototype,"trimStart",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimStart called on null or undefined");return _trimString(this,"start")}}),String.prototype.trimLeft||Object.defineProperty(String.prototype,"trimLeft",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimLeft called on null or undefined");return _trimString(this,"start")}}),String.prototype.trimEnd||Object.defineProperty(String.prototype,"trimEnd",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimEnd called on null or undefined");return _trimString(this,"end")}}),String.prototype.trimRight||Object.defineProperty(String.prototype,"trimRight",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.trimRight called on null or undefined");return _trimString(this,"end")}})}(),function(){var _regExpMetaCharsRe,_hasRegExpMetaCharsRe,_formatRegExp,_hasFormatRegExp,_nativeMathRandom=Math.random;function _random(){var min,max;switch(arguments.length){case 0:throw new Error("_random called with insufficient parameters");case 1:min=0,max=arguments[0];break;default:min=arguments[0],max=arguments[1]}if(min>max){var _ref=[max,min];min=_ref[0],max=_ref[1]}return Math.floor(_nativeMathRandom()*(max-min+1))+min}function _randomIndex(length,boundsArgs){var min,max;switch(boundsArgs.length){case 1:min=0,max=length-1;break;case 2:min=0,max=Math.trunc(boundsArgs[1]);break;default:min=Math.trunc(boundsArgs[1]),max=Math.trunc(boundsArgs[2])}return Number.isNaN(min)?min=0:!Number.isFinite(min)||min>=length?min=length-1:min<0&&(min=length+min)<0&&(min=0),Number.isNaN(max)?max=0:(!Number.isFinite(max)||max>=length||max<0&&(max=length+max)<0)&&(max=length-1),_random(min,max)}function _getCodePointStartAndEnd(str,pos){var code=str.charCodeAt(pos);if(Number.isNaN(code))return{char:"",start:-1,end:-1};if(code<55296||code>57343)return{char:str.charAt(pos),start:pos,end:pos};if(code>=55296&&code<=56319){var nextPos=pos+1;if(nextPos>=str.length)throw new Error("high surrogate without trailing low surrogate");var nextCode=str.charCodeAt(nextPos);if(nextCode<56320||nextCode>57343)throw new Error("high surrogate without trailing low surrogate");return{char:str.charAt(pos)+str.charAt(nextPos),start:pos,end:nextPos}}if(0===pos)throw new Error("low surrogate without leading high surrogate");var prevPos=pos-1,prevCode=str.charCodeAt(prevPos);if(prevCode<55296||prevCode>56319)throw new Error("low surrogate without leading high surrogate");return{char:str.charAt(prevPos)+str.charAt(pos),start:prevPos,end:pos}}Object.defineProperty(Array.prototype,"concatUnique",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.concatUnique called on null or undefined");var result=Array.from(this);if(0===arguments.length)return result;var items=Array.prototype.reduce.call(arguments,(function(prev,cur){return prev.concat(cur)}),[]),addSize=items.length;if(0===addSize)return result;for(var indexOf=Array.prototype.indexOf,push=Array.prototype.push,i=0;i<addSize;++i){var value=items[i];-1===indexOf.call(result,value)&&push.call(result,value)}return result}}),Object.defineProperty(Array.prototype,"count",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.count called on null or undefined");for(var indexOf=Array.prototype.indexOf,needle=arguments[0],pos=Number(arguments[1])||0,count=0;-1!==(pos=indexOf.call(this,needle,pos));)++count,++pos;return count}}),Object.defineProperty(Array.prototype,"countWith",{configurable:!0,writable:!0,value:function(predicate,thisArg){if(null==this)throw new TypeError("Array.prototype.countWith called on null or undefined");if("function"!=typeof predicate)throw new Error("Array.prototype.countWith predicate parameter must be a function");var length=this.length>>>0;if(0===length)return 0;for(var count=0,i=0;i<length;++i)predicate.call(thisArg,this[i],i,this)&&++count;return count}}),Object.defineProperty(Array.prototype,"deleteAll",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.deleteAll called on null or undefined");if(0===arguments.length)return[];var length=this.length>>>0;if(0===length)return[];for(var needles=Array.prototype.concat.apply([],arguments),needlesLength=needles.length,indices=[],i=0;i<length;++i)for(var value=this[i],j=0;j<needlesLength;++j){var needle=needles[j];if(value===needle||value!=value&&needle!=needle){indices.push(i);break}}for(var result=[],_i=0,iend=indices.length;_i<iend;++_i)result[_i]=this[indices[_i]];for(var splice=Array.prototype.splice,_i2=indices.length-1;_i2>=0;--_i2)splice.call(this,indices[_i2],1);return result}}),Object.defineProperty(Array.prototype,"deleteAt",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.deleteAt called on null or undefined");if(0===arguments.length)return[];var length=this.length>>>0;if(0===length)return[];for(var splice=Array.prototype.splice,cpyIndices=Array.from(new Set(Array.from(arguments).map((function(x){return x<0?Math.max(0,length+x):x}))).values()),delIndices=Array.from(cpyIndices).sort((function(a,b){return b-a})),result=[],i=0,iend=cpyIndices.length;i<iend;++i)result[i]=this[cpyIndices[i]];for(var _i3=0,_iend=delIndices.length;_i3<_iend;++_i3)splice.call(this,delIndices[_i3],1);return result}}),Object.defineProperty(Array.prototype,"deleteFirst",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.deleteFirst called on null or undefined");if(0!==arguments.length){var length=this.length>>>0;if(0!==length){for(var splice=Array.prototype.splice,needles=Array.prototype.concat.apply([],arguments),result=[],i=0;i<length&&needles.length>0;++i)for(var value=this[i],j=0;j<needles.length;++j){var needle=needles[j];if(value===needle||value!=value&&needle!=needle){result.push(value),splice.call(this,i--,1),needles.splice(j--,1);break}}return result}}}}),Object.defineProperty(Array.prototype,"deleteLast",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.deleteLast called on null or undefined");if(0!==arguments.length){var length=this.length>>>0;if(0!==length){for(var splice=Array.prototype.splice,needles=Array.prototype.concat.apply([],arguments),result=[],i=length-1;i>=0&&needles.length>0;--i)for(var value=this[i],j=0;j<needles.length;++j){var needle=needles[j];if(value===needle||value!=value&&needle!=needle){result.push(value),splice.call(this,i++,1),needles.splice(j--,1);break}}return result}}}}),Object.defineProperty(Array.prototype,"deleteWith",{configurable:!0,writable:!0,value:function(predicate,thisArg){if(null==this)throw new TypeError("Array.prototype.deleteWith called on null or undefined");if("function"!=typeof predicate)throw new Error("Array.prototype.deleteWith predicate parameter must be a function");var length=this.length>>>0;if(0===length)return[];for(var splice=Array.prototype.splice,indices=[],result=[],i=0;i<length;++i)predicate.call(thisArg,this[i],i,this)&&(result.push(this[i]),indices.push(i));for(var _i4=indices.length-1;_i4>=0;--_i4)splice.call(this,indices[_i4],1);return result}}),Object.defineProperty(Array.prototype,"first",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.first called on null or undefined");if(0!==this.length>>>0)return this[0]}}),Object.defineProperty(Array.prototype,"includesAll",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.includesAll called on null or undefined");if(1===arguments.length)return Array.isArray(arguments[0])?Array.prototype.includesAll.apply(this,arguments[0]):Array.prototype.includes.apply(this,arguments);for(var i=0,iend=arguments.length;i<iend;++i)if(!Array.prototype.some.call(this,(function(val){return val===this.val||val!=val&&this.val!=this.val}),{val:arguments[i]}))return!1;return!0}}),Object.defineProperty(Array.prototype,"includesAny",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.includesAny called on null or undefined");if(1===arguments.length)return Array.isArray(arguments[0])?Array.prototype.includesAny.apply(this,arguments[0]):Array.prototype.includes.apply(this,arguments);for(var i=0,iend=arguments.length;i<iend;++i)if(Array.prototype.some.call(this,(function(val){return val===this.val||val!=val&&this.val!=this.val}),{val:arguments[i]}))return!0;return!1}}),Object.defineProperty(Array.prototype,"last",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.last called on null or undefined");var length=this.length>>>0;if(0!==length)return this[length-1]}}),Object.defineProperty(Array.prototype,"pluck",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.pluck called on null or undefined");var length=this.length>>>0;if(0!==length){var index=0===arguments.length?_random(0,length-1):_randomIndex(length,Array.from(arguments));return Array.prototype.splice.call(this,index,1)[0]}}}),Object.defineProperty(Array.prototype,"pluckMany",{configurable:!0,writable:!0,value:function(wantSize){if(null==this)throw new TypeError("Array.prototype.pluckMany called on null or undefined");var length=this.length>>>0;if(0===length)return[];var want=Math.trunc(wantSize);if(!Number.isInteger(want))throw new Error("Array.prototype.pluckMany want parameter must be an integer");if(want<1)return[];want>length&&(want=length);var splice=Array.prototype.splice,result=[],max=length-1;do{result.push(splice.call(this,_random(0,max--),1)[0])}while(result.length<want);return result}}),Object.defineProperty(Array.prototype,"pushUnique",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.pushUnique called on null or undefined");var addSize=arguments.length;if(0===addSize)return this.length>>>0;for(var indexOf=Array.prototype.indexOf,push=Array.prototype.push,i=0;i<addSize;++i){var value=arguments[i];-1===indexOf.call(this,value)&&push.call(this,value)}return this.length>>>0}}),Object.defineProperty(Array.prototype,"random",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.random called on null or undefined");var length=this.length>>>0;if(0!==length)return this[0===arguments.length?_random(0,length-1):_randomIndex(length,Array.from(arguments))]}}),Object.defineProperty(Array.prototype,"randomMany",{configurable:!0,writable:!0,value:function(wantSize){if(null==this)throw new TypeError("Array.prototype.randomMany called on null or undefined");var length=this.length>>>0;if(0===length)return[];var want=Math.trunc(wantSize);if(!Number.isInteger(want))throw new Error("Array.prototype.randomMany want parameter must be an integer");if(want<1)return[];want>length&&(want=length);var picked=new Map,result=[],max=length-1;do{var i=void 0;do{i=_random(0,max)}while(picked.has(i));picked.set(i,!0),result.push(this[i])}while(result.length<want);return result}}),Object.defineProperty(Array.prototype,"shuffle",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.shuffle called on null or undefined");var length=this.length>>>0;if(0===length)return this;for(var i=length-1;i>0;--i){var j=Math.floor(_nativeMathRandom()*(i+1));if(i!==j){var swap=this[i];this[i]=this[j],this[j]=swap}}return this}}),Object.defineProperty(Array.prototype,"toShuffled",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.toShuffled called on null or undefined");return Array.from(this).shuffle()}}),Object.defineProperty(Array.prototype,"toUnique",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.toUnique called on null or undefined");return Array.from(new Set(this))}}),Object.defineProperty(Array.prototype,"unshiftUnique",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Array.prototype.unshiftUnique called on null or undefined");var addSize=arguments.length;if(0===addSize)return this.length>>>0;for(var indexOf=Array.prototype.indexOf,unshift=Array.prototype.unshift,i=0;i<addSize;++i){var value=arguments[i];-1===indexOf.call(this,value)&&unshift.call(this,value)}return this.length>>>0}}),Object.defineProperty(Function.prototype,"partial",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("Function.prototype.partial called on null or undefined");var slice=Array.prototype.slice,fn=this,bound=slice.call(arguments,0);return function(){for(var applied=[],argc=0,i=0;i<bound.length;++i)applied.push(bound[i]===undefined?arguments[argc++]:bound[i]);return fn.apply(this,applied.concat(slice.call(arguments,argc)))}}}),Object.defineProperty(Math,"clamp",{configurable:!0,writable:!0,value:function(num,min,max){if(3!==arguments.length)throw new Error("Math.clamp called with an incorrect number of parameters (want: 3, received: ".concat(arguments.length,")"));var value=Number(num),minVal=Number(min),maxVal=Number(max);if(minVal>maxVal){var _ref2=[maxVal,minVal];minVal=_ref2[0],maxVal=_ref2[1]}return Math.min(Math.max(value,minVal),maxVal)}}),RegExp.escape||(_regExpMetaCharsRe=/[\\^$*+?.()|[\]{}]/g,_hasRegExpMetaCharsRe=new RegExp(_regExpMetaCharsRe.source),Object.defineProperty(RegExp,"escape",{configurable:!0,writable:!0,value:function(str){var val=String(str);return val&&_hasRegExpMetaCharsRe.test(val)?val.replace(_regExpMetaCharsRe,"\\$&"):val}})),_formatRegExp=/{(\d+)(?:,([+-]?\d+))?}/g,_hasFormatRegExp=new RegExp(_formatRegExp.source),Object.defineProperty(String,"format",{configurable:!0,writable:!0,value:function(format){if(arguments.length<2)return 0===arguments.length?"":format;var args=2===arguments.length&&Array.isArray(arguments[1])?Array.from(arguments[1]):Array.prototype.slice.call(arguments,1);return 0===args.length?format:_hasFormatRegExp.test(format)?(_formatRegExp.lastIndex=0,format.replace(_formatRegExp,(function(match,index,align){var retval=args[index];if(null==retval)return"";for(;"function"==typeof retval;)retval=retval();switch(_typeof(retval)){case"string":break;case"object":retval=JSON.stringify(retval);break;default:retval=String(retval)}return function(str,align,pad){if(!align)return str;var plen=Math.abs(align)-str.length;if(plen<1)return str;var padding=String(pad).repeat(plen);return align<0?str+padding:padding+str}(retval,align?Number.parseInt(align,10):0," ")}))):format}}),Object.defineProperty(String.prototype,"count",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.count called on null or undefined");var needle=String(arguments[0]||"");if(""===needle)return 0;for(var indexOf=String.prototype.indexOf,step=needle.length,pos=Number(arguments[1])||0,count=0;-1!==(pos=indexOf.call(this,needle,pos));)++count,pos+=step;return count}}),Object.defineProperty(String.prototype,"first",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.first called on null or undefined");return _getCodePointStartAndEnd(String(this),0).char}}),Object.defineProperty(String.prototype,"last",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.last called on null or undefined");var str=String(this);return _getCodePointStartAndEnd(str,str.length-1).char}}),Object.defineProperty(String.prototype,"splice",{configurable:!0,writable:!0,value:function(startAt,delCount,replacement){if(null==this)throw new TypeError("String.prototype.splice called on null or undefined");var length=this.length>>>0;if(0===length)return"";var start=Number(startAt);Number.isSafeInteger(start)?start<0&&(start+=length)<0&&(start=0):start=0,start>length&&(start=length);var count=Number(delCount);(!Number.isSafeInteger(count)||count<0)&&(count=0);var res=this.slice(0,start);return void 0!==replacement&&(res+=replacement),start+count<length&&(res+=this.slice(start+count)),res}}),Object.defineProperty(String.prototype,"splitOrEmpty",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.splitOrEmpty called on null or undefined");return""===String(this)?[]:String.prototype.split.apply(this,arguments)}}),Object.defineProperty(String.prototype,"toLocaleUpperFirst",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.toLocaleUpperFirst called on null or undefined");var str=String(this),_getCodePointStartAnd3=_getCodePointStartAndEnd(str,0),char=_getCodePointStartAnd3.char,end=_getCodePointStartAnd3.end;return-1===end?"":char.toLocaleUpperCase()+str.slice(end+1)}}),Object.defineProperty(String.prototype,"toUpperFirst",{configurable:!0,writable:!0,value:function(){if(null==this)throw new TypeError("String.prototype.toUpperFirst called on null or undefined");var str=String(this),_getCodePointStartAnd4=_getCodePointStartAndEnd(str,0),char=_getCodePointStartAnd4.char,end=_getCodePointStartAnd4.end;return-1===end?"":char.toUpperCase()+str.slice(end+1)}}),Object.defineProperty(Array.prototype,"delete",{configurable:!0,writable:!0,value:function(){if(console.warn("[DEPRECATED] <Array>.delete() is deprecated."),null==this)throw new TypeError("Array.prototype.delete called on null or undefined");return Array.prototype.deleteAll.apply(this,arguments)}}),Object.defineProperty(JSON,"reviveWrapper",{configurable:!0,writable:!0,value:function(code,data){if(console.warn("[DEPRECATED] JSON.reviveWrapper() is deprecated."),"string"!=typeof code)throw new TypeError("JSON.reviveWrapper code parameter must be a string");return Serial.createReviver(code,data)}}),Object.defineProperty(Math,"easeInOut",{configurable:!0,writable:!0,value:function(num){return console.warn("[DEPRECATED] Math.easeInOut() is deprecated."),1-(Math.cos(Number(num)*Math.PI)+1)/2}}),Object.defineProperty(Number.prototype,"clamp",{configurable:!0,writable:!0,value:function(){if(console.warn("[DEPRECATED] <Number>.clamp() is deprecated."),null==this)throw new TypeError("Number.prototype.clamp called on null or undefined");if(2!==arguments.length)throw new Error("Number.prototype.clamp called with an incorrect number of parameters (want: 2, received: ".concat(arguments.length,")"));return Math.clamp(this,arguments[0],arguments[1])}})}(),function(){function onKeypressFn(ev){13!==ev.which&&32!==ev.which||(ev.preventDefault(),triggerEvent("click",getActiveElement()||this))}function onClickFnWrapper(fn){return function(){var $this=jQuery(this);$this.ariaIsDisabled()||($this.is("[aria-pressed]")&&$this.attr("aria-pressed","true"===$this.attr("aria-pressed")?"false":"true"),fn.apply(this,arguments))}}function disableTabindex(el){if(!el.hasAttribute("data-last-tabindex")){var tabindex=el.getAttribute("tabindex");el.setAttribute("data-last-tabindex",null!==tabindex?tabindex.trim():"")}el.setAttribute("tabindex",-1)}function restoreTabindex(el){var lastTabindex=el.getAttribute("data-last-tabindex");null!==lastTabindex&&(el.removeAttribute("data-last-tabindex"),""===lastTabindex?el.removeAttribute("tabindex"):el.setAttribute("tabindex",lastTabindex))}jQuery.fn.extend({ariaClick:function(options,handler){if(0===this.length||0===arguments.length)return this;var opts=options,fn=handler;return null==fn&&(fn=opts,opts=undefined),"string"!=typeof(opts=jQuery.extend({namespace:undefined,one:!1,selector:undefined,data:undefined,role:undefined,tabindex:0,controls:undefined,pressed:undefined,label:undefined},opts)).namespace?opts.namespace="":"."!==opts.namespace[0]&&(opts.namespace=".".concat(opts.namespace)),"boolean"==typeof opts.pressed&&(opts.pressed=opts.pressed?"true":"false"),this.filter("button").prop("type","button"),null!=opts.role?this.attr("role",opts.role):this.not("[role]").filter("a,[data-passage]").attr("role","link").end().not("a").not("[data-passage]").attr("role","button").end().end().end(),this.attr("tabindex",opts.tabindex),null!=opts.controls&&this.attr("aria-controls",opts.controls),null!=opts.pressed&&this.attr("aria-pressed",opts.pressed),null!=opts.label&&this.attr({"aria-label":opts.label,title:opts.label}),this.not("button").on("keypress.aria-clickable".concat(opts.namespace),opts.selector,onKeypressFn),this.on("click.aria-clickable".concat(opts.namespace),opts.selector,opts.data,opts.one?function(fn){return onClickFnWrapper((function(){jQuery(this).off(".aria-clickable").removeAttr("role tabindex aria-controls aria-pressed").filter("button").prop("disabled",!0),fn.apply(this,arguments)}))}(fn):onClickFnWrapper(fn)),this},ariaDisabled:function(disable){if(0===this.length||0===arguments.length)return this;var $nonDisableable=this.not("button,fieldset,input,menuitem,optgroup,option,select,textarea"),$disableable=this.filter("button,fieldset,input,menuitem,optgroup,option,select,textarea");return disable?($nonDisableable.each((function(){this.setAttribute("disabled","disabled"),this.setAttribute("aria-disabled","true"),disableTabindex(this)})),$disableable.each((function(){this.disabled=!0,this.setAttribute("aria-disabled","true"),disableTabindex(this)}))):($nonDisableable.each((function(){this.removeAttribute("disabled"),this.removeAttribute("aria-disabled"),restoreTabindex(this)})),$disableable.each((function(){this.disabled=!1,this.removeAttribute("aria-disabled"),restoreTabindex(this)}))),this},ariaIsDisabled:function(){return this.is("[disabled]")}})}(),jQuery.fn.extend({getForbiddenInteractiveContentTagNames:function(){if(0===this.length)return[];var forbidden=new Set;return this.find("a,button,fieldset,form,input,menuitem,optgroup,option,select,textarea").each((function(_,el){return forbidden.add(el.nodeName.toLowerCase())})),Array.from(forbidden)}}),jQuery.extend({wikiWithOptions:function(options){for(var _len=arguments.length,sources=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)sources[_key-1]=arguments[_key];if(0!==sources.length){var frag=document.createDocumentFragment();sources.forEach((function(content){return new Wikifier(frag,content,options)}));var errors=Array.from(frag.querySelectorAll(".error")).map((function(errEl){return errEl.textContent.replace(errorPrologRegExp,"")}));if(errors.length>0)throw new Error(errors.join("; "))}},wiki:function(){for(var _len2=arguments.length,sources=new Array(_len2),_key2=0;_key2<_len2;_key2++)sources[_key2]=arguments[_key2];this.wikiWithOptions.apply(this,[undefined].concat(sources))},wikiPassage:function(name){this.wikiWithOptions(undefined,Story.get(name).processText())}}),jQuery.fn.extend({wikiWithOptions:function(options){for(var _len3=arguments.length,sources=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++)sources[_key3-1]=arguments[_key3];if(0===this.length||0===sources.length)return this;var frag=document.createDocumentFragment();return sources.forEach((function(content){return new Wikifier(frag,content,options)})),this.append(frag),this},wiki:function(){for(var _len4=arguments.length,sources=new Array(_len4),_key4=0;_key4<_len4;_key4++)sources[_key4]=arguments[_key4];return this.wikiWithOptions.apply(this,[undefined].concat(sources))},wikiPassage:function(name){return this.wikiWithOptions(undefined,Story.get(name).processText())}});var Browser=(userAgent=navigator.userAgent.toLowerCase(),winPhone=userAgent.includes("windows phone"),isMobile=Object.freeze({Android:!winPhone&&userAgent.includes("android"),BlackBerry:/blackberry|bb10/.test(userAgent),iOS:!winPhone&&/ip(?:hone|ad|od)/.test(userAgent),Opera:!winPhone&&("object"===_typeof(window.operamini)||userAgent.includes("opera mini")),Windows:winPhone||/iemobile|wpdesktop/.test(userAgent),any:function(){return isMobile.Android||isMobile.BlackBerry||isMobile.iOS||isMobile.Opera||isMobile.Windows}}),isGecko=!isMobile.Windows&&!/khtml|trident|edge/.test(userAgent)&&userAgent.includes("gecko"),isIE=!userAgent.includes("opera")&&/msie|trident/.test(userAgent),ieVersion=isIE?(ver=/(?:msie\s+|rv:)(\d+\.\d)/.exec(userAgent))?Number(ver[1]):0:null,isOpera=userAgent.includes("opera")||userAgent.includes(" opr/"),operaVersion=isOpera?function(){var ver=new RegExp("".concat(/khtml|chrome/.test(userAgent)?"opr":"version","\\/(\\d+\\.\\d+)")).exec(userAgent);return ver?Number(ver[1]):0}():null,isVivaldi=userAgent.includes("vivaldi"),Object.freeze(Object.assign(Object.create(null),{userAgent:userAgent,isMobile:isMobile,isGecko:isGecko,isIE:isIE,ieVersion:ieVersion,isOpera:isOpera,operaVersion:operaVersion,isVivaldi:isVivaldi}))),ver,userAgent,winPhone,isMobile,isGecko,isIE,ieVersion,isOpera,operaVersion,isVivaldi,Has=(hasAudioElement=function(){try{return"function"==typeof document.createElement("audio").canPlayType}catch(ex){}return!1}(),hasFile=function(){try{return"Blob"in window&&"File"in window&&"FileList"in window&&"FileReader"in window&&(!Browser.isOpera||Browser.operaVersion>=15)}catch(ex){}return!1}(),hasGeolocation=function(){try{return"geolocation"in navigator&&"function"==typeof navigator.geolocation.getCurrentPosition&&"function"==typeof navigator.geolocation.watchPosition}catch(ex){}return!1}(),hasMutationObserver=function(){try{return"MutationObserver"in window&&"function"==typeof window.MutationObserver}catch(ex){}return!1}(),hasPerformance=function(){try{return"performance"in window&&"function"==typeof window.performance.now}catch(ex){}return!1}(),hasTouch=function(){try{return"ontouchstart"in window||!!window.DocumentTouch&&document instanceof window.DocumentTouch||!!navigator.maxTouchPoints||!!navigator.msMaxTouchPoints}catch(ex){}return!1}(),hasTransitionEndEvent=function(){try{for(var teMap=new Map([["transition","transitionend"],["MSTransition","msTransitionEnd"],["WebkitTransition","webkitTransitionEnd"],["MozTransition","transitionend"]]),teKeys=Array.from(teMap.keys()),el=document.createElement("div"),i=0;i<teKeys.length;++i)if(el.style[teKeys[i]]!==undefined)return teMap.get(teKeys[i])}catch(ex){}return!1}(),Object.freeze(Object.assign(Object.create(null),{audio:hasAudioElement,fileAPI:hasFile,geolocation:hasGeolocation,mutationObserver:hasMutationObserver,performance:hasPerformance,touch:hasTouch,transitionEndEvent:hasTransitionEndEvent}))),hasAudioElement,hasFile,hasGeolocation,hasMutationObserver,hasPerformance,hasTouch,hasTransitionEndEvent,Fullscreen=function(){var _hasPromise,vendor=function(){try{return Object.freeze([{isEnabled:"fullscreenEnabled",element:"fullscreenElement",requestFn:"requestFullscreen",exitFn:"exitFullscreen",changeEvent:"fullscreenchange",errorEvent:"fullscreenerror"},{isEnabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",requestFn:"webkitRequestFullscreen",exitFn:"webkitExitFullscreen",changeEvent:"webkitfullscreenchange",errorEvent:"webkitfullscreenerror"},{isEnabled:"mozFullScreenEnabled",element:"mozFullScreenElement",requestFn:"mozRequestFullScreen",exitFn:"mozCancelFullScreen",changeEvent:"mozfullscreenchange",errorEvent:"mozfullscreenerror"},{isEnabled:"msFullscreenEnabled",element:"msFullscreenElement",requestFn:"msRequestFullscreen",exitFn:"msExitFullscreen",changeEvent:"MSFullscreenChange",errorEvent:"MSFullscreenError"}].find((function(vnd){return vnd.isEnabled in document})))}catch(ex){}return undefined}(),_returnsPromise=(_hasPromise=null,function(){if(null!==_hasPromise)return _hasPromise;if(_hasPromise=!1,vendor)try{var value=document.exitFullscreen();value.catch((function(){})),_hasPromise=value instanceof Promise}catch(ex){}return _hasPromise});function _selectElement(requestedEl){var selectedEl=requestedEl||document.documentElement;return selectedEl===document.documentElement&&("msRequestFullscreen"===vendor.requestFn||Browser.isOpera&&Browser.operaVersion<15)&&(selectedEl=document.body),selectedEl}function isFullscreen(){return Boolean(vendor&&document[vendor.element])}function requestFullscreen(options,requestedEl){if(!vendor)return Promise.reject(new Error("fullscreen not supported"));var element=_selectElement(requestedEl);if("function"!=typeof element[vendor.requestFn])return Promise.reject(new Error("fullscreen not supported"));if(isFullscreen())return Promise.resolve();if(_returnsPromise())return element[vendor.requestFn](options);var namespace=".Fullscreen_requestFullscreen";return new Promise((function(resolve,reject){var $element=jQuery(element);$element.off(namespace).one("".concat(vendor.errorEvent).concat(namespace," ").concat(vendor.changeEvent).concat(namespace),(function(ev){$element.off(namespace),ev.type===vendor.errorEvent?reject(new Error("unknown fullscreen request error")):resolve()})),element[vendor.requestFn](options)}))}function exitFullscreen(){if(!vendor||"function"!=typeof document[vendor.exitFn])return Promise.reject(new TypeError("fullscreen not supported"));if(!isFullscreen())return Promise.reject(new TypeError("fullscreen mode not active"));if(_returnsPromise())return document[vendor.exitFn]();var namespace=".Fullscreen_exitFullscreen";return new Promise((function(resolve,reject){var $document=jQuery(document);$document.off(namespace).one("".concat(vendor.errorEvent).concat(namespace," ").concat(vendor.changeEvent).concat(namespace),(function(ev){$document.off(namespace),ev.type===vendor.errorEvent?reject(new Error("unknown fullscreen exit error")):resolve()})),document[vendor.exitFn]()}))}return Object.preventExtensions(Object.create(null,{vendor:{get:function(){return vendor}},element:{get:function(){return vendor?document[vendor.element]:null}},isEnabled:{value:function(){return Boolean(vendor&&document[vendor.isEnabled])}},isFullscreen:{value:isFullscreen},request:{value:requestFullscreen},exit:{value:exitFullscreen},toggle:{value:function(options,requestedEl){return isFullscreen()?exitFullscreen():requestFullscreen(options,requestedEl)}},onChange:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);jQuery(element).on(vendor.changeEvent,handlerFn)}}},offChange:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);handlerFn?jQuery(element).off(vendor.changeEvent,handlerFn):jQuery(element).off(vendor.changeEvent)}}},onError:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);jQuery(element).on(vendor.errorEvent,handlerFn)}}},offError:{value:function(handlerFn,requestedEl){if(vendor){var element=_selectElement(requestedEl);handlerFn?jQuery(element).off(vendor.errorEvent,handlerFn):jQuery(element).off(vendor.errorEvent)}}}}))}(),Outliner=function(){var lastEvent,styleEl=null;function outlinerHide(){document.documentElement.removeAttribute("data-outlines"),styleEl.styleSheet?styleEl.styleSheet.cssText="*:focus{outline:none;}":styleEl.textContent="*:focus{outline:none;}"}function outlinerShow(){document.documentElement.setAttribute("data-outlines",""),styleEl.styleSheet?styleEl.styleSheet.cssText="":styleEl.textContent=""}return Object.preventExtensions(Object.create(null,{init:{value:function(){styleEl||(styleEl=document.createElement("style"),jQuery(styleEl).attr({id:"style-outliner",type:"text/css"}).appendTo(document.head),jQuery(document).on("mousedown.style-outliner keydown.style-outliner",(function(ev){ev.type!==lastEvent&&(lastEvent=ev.type,"keydown"===ev.type?outlinerShow():outlinerHide())})),lastEvent="mousedown",outlinerHide())}},hide:{value:outlinerHide},show:{value:outlinerShow}}))}(),Serial=function(){var supportedTypes=Object.freeze([{id:"Date",get reference(){return Date.prototype},method:function(){return["(revive:date)",this.toISOString()]}},{id:"Function",get reference(){return Function.prototype},method:function(){return["(revive:)",["(".concat(this.toString(),")")]]}},{id:"Map",get reference(){return Map.prototype},method:function(){return["(revive:map)",Array.from(this)]}},{id:"RegExp",get reference(){return RegExp.prototype},method:function(){return["(revive:)",[this.toString()]]}},{id:"Set",get reference(){return Set.prototype},method:function(){return["(revive:set)",Array.from(this)]}}]);function createReviver(code,data){if("string"!=typeof code)throw new TypeError("Serial.createReviver code parameter must be a string");return["(revive:)",[code,data]]}function parse(text,reviver){return JSON.parse(text,(function(key,val){var value=val;if(value instanceof Array&&2===value.length)switch(value[0]){case"(revive:set)":value=new Set(value[1]);break;case"(revive:map)":value=new Map(value[1]);break;case"(revive:date)":value=new Date(value[1]);break;case"(revive:eval)":case"(revive:)":try{var $ReviveData$=value[1][1];value=eval(value[1][0])}catch(ex){}}if("function"==typeof reviver)try{value=reviver(key,value)}catch(ex){}return value}))}function stringify(value,replacer,space){var origMethodCache=new Map;supportedTypes.forEach((function(_ref3){var id=_ref3.id,reference=_ref3.reference,method=_ref3.method;Object.hasOwn(reference,"toJSON")&&origMethodCache.set(id,reference.toJSON),Object.defineProperty(reference,"toJSON",{configurable:!0,writable:!0,value:method})}));var notation=JSON.stringify(value,(function(key,val){var value=val;if("function"==typeof replacer)try{value=replacer(key,value)}catch(ex){}switch(value){case undefined:value=["(revive:)",["undefined"]];break;case 1/0:value=["(revive:)",["Infinity"]]}return value}),space);return supportedTypes.forEach((function(_ref4){var id=_ref4.id,reference=_ref4.reference;origMethodCache.has(id)?(Object.defineProperty(reference,"toJSON",{configurable:!0,writable:!0,value:origMethodCache.get(id)}),origMethodCache.delete(id)):delete reference.toJSON})),notation}return Object.preventExtensions(Object.create(null,{createReviver:{value:createReviver},parse:{value:parse},stringify:{value:stringify}}))}(),Visibility=(vendor=function(){try{return Object.freeze([{hiddenProperty:"hidden",stateProperty:"visibilityState",changeEvent:"visibilitychange"},{hiddenProperty:"webkitHidden",stateProperty:"webkitVisibilityState",changeEvent:"webkitvisibilitychange"},{hiddenProperty:"mozHidden",stateProperty:"mozVisibilityState",changeEvent:"mozvisibilitychange"},{hiddenProperty:"msHidden",stateProperty:"msVisibilityState",changeEvent:"msvisibilitychange"}].find((function(vnd){return vnd.hiddenProperty in document})))}catch(ex){}return undefined}(),Object.preventExtensions(Object.create(null,{vendor:{get:function(){return vendor}},state:{get:function(){return vendor&&document[vendor.stateProperty]||"visible"}},isEnabled:{value:function(){return Boolean(vendor)}},isHidden:{value:function(){return Boolean(vendor&&document[vendor.hiddenProperty])}},hiddenProperty:{value:vendor&&vendor.hiddenProperty},stateProperty:{value:vendor&&vendor.stateProperty},changeEvent:{value:vendor&&vendor.changeEvent}}))),vendor;function appendError(output,message,source){var $wrapper=jQuery(document.createElement("div")),$toggle=jQuery(document.createElement("button")),$source=jQuery(document.createElement("pre")),mesg="".concat(L10n.get("errorViewTitle"),": ").concat(message||"unknown error");return $toggle.addClass("error-toggle").ariaClick({label:L10n.get("errorViewLabelToggle")},(function(){$toggle.hasClass("enabled")?($toggle.removeClass("enabled"),$source.attr({"aria-hidden":!0,hidden:"hidden"})):($toggle.addClass("enabled"),$source.removeAttr("aria-hidden hidden"))})).appendTo($wrapper),jQuery(document.createElement("span")).addClass("error").text(mesg).appendTo($wrapper),jQuery(document.createElement("code")).text(source).appendTo($source),$source.addClass("error-source").attr({"aria-hidden":!0,hidden:"hidden"}).appendTo($wrapper),$wrapper.addClass("error-view").appendTo(output),console.warn("".concat(mesg,"\n\t").concat(source.replace(/\n/g,"\n\t"))),!1}var throwError=appendError;function charAndPosAt(string,position){var str=String(string),pos=Math.trunc(position),code=str.charCodeAt(pos);if(Number.isNaN(code))return{char:"",start:-1,end:-1};var retval={char:str.charAt(pos),start:pos,end:pos};if(code<55296||code>57343)return retval;if(code>=55296&&code<=56319){var nextPos=pos+1;if(nextPos>=str.length)return retval;var nextCode=str.charCodeAt(nextPos);return nextCode<56320||nextCode>57343||(retval.char=retval.char+str.charAt(nextPos),retval.end=nextPos),retval}if(0===pos)return retval;var prevPos=pos-1,prevCode=str.charCodeAt(prevPos);return prevCode<55296||prevCode>56319||(retval.char=str.charAt(prevPos)+retval.char,retval.start=prevPos),retval}function clone(O){if("object"!==_typeof(O)||null===O)return O;if("function"==typeof O.clone)return O.clone(!0);var copy;if(O instanceof Array)copy=new Array(O.length);else if(O instanceof Date)copy=new Date(O.getTime());else if(O instanceof Map)copy=new Map,O.forEach((function(val,key){return copy.set(clone(key),clone(val))}));else if(O instanceof RegExp)copy=new RegExp(O);else if(O instanceof Set)copy=new Set,O.forEach((function(val){return copy.add(clone(val))}));else{var type=getTypeOf(O);if("Object"!==type)throw new TypeError("attempted to clone unsupported type: ".concat(type));copy=Object.create(Object.getPrototypeOf(O))}return Object.keys(O).forEach((function(P){return copy[P]=clone(O[P])})),copy}var convertBreaks=function(){var isNotSpaceRE=new RegExp(Patterns.notSpace);function isParagraphEmpty(para){if(!para.hasChildNodes())return!0;for(var nodes=para.childNodes,length=nodes.length,i=0;i<length;++i){var node=nodes[i];switch(node.nodeType){case Node.TEXT_NODE:if(isNotSpaceRE.test(node.nodeValue))return!1;break;case Node.COMMENT_NODE:break;default:return!1}}return!0}return function(source){for(var node,output=document.createDocumentFragment(),para=document.createElement("p");null!==(node=source.firstChild);){if(node.nodeType===Node.ELEMENT_NODE)switch(node.nodeName.toUpperCase()){case"BR":if(null!==node.nextSibling&&node.nextSibling.nodeType===Node.ELEMENT_NODE&&"BR"===node.nextSibling.nodeName.toUpperCase()){source.removeChild(node.nextSibling),source.removeChild(node),isParagraphEmpty(para)||output.appendChild(para),para=document.createElement("p");continue}if(isParagraphEmpty(para)){source.removeChild(node);continue}break;case"ADDRESS":case"ARTICLE":case"ASIDE":case"BLOCKQUOTE":case"CENTER":case"DIV":case"DL":case"FIGURE":case"FOOTER":case"FORM":case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"HEADER":case"HR":case"MAIN":case"NAV":case"OL":case"P":case"PRE":case"SECTION":case"TABLE":case"UL":isParagraphEmpty(para)||(output.appendChild(para),para=document.createElement("p")),output.appendChild(node);continue}para.appendChild(node)}isParagraphEmpty(para)||output.appendChild(para),source.appendChild(output)}}(),createFilename=(illegalCharsRE=/[\x00-\x1f"#$%&'*+,/:;<=>?\\^`|\x7f-\x9f]+/g,function(str){return String(str).trim().replace(illegalCharsRE,"")}),illegalCharsRE,createSlug=function(){var illegalCharsRE=/[\x00-\x20!-/:-@[-^`{-\x9f]+/g,isInvalidSlugRE=/^-*$/,storySigilRE=/^\$/,tempSigilRE=/^_/;return function(str){var base=String(str).trim(),legacy=base.replace(/[^\w\s\u2013\u2014-]+/g,"").replace(/[_\s\u2013\u2014-]+/g,"-").toLocaleLowerCase();return isInvalidSlugRE.test(legacy)?base.replace(storySigilRE,"").replace(tempSigilRE,"-").replace(illegalCharsRE,""):legacy}}();function cssPropToDOMProp(cssName){if(!cssName.includes("-"))switch(cssName){case"bgcolor":return"backgroundColor";case"float":return"cssFloat";default:return cssName}return("-ms-"===cssName.slice(0,4)?cssName.slice(1):cssName).split("-").map((function(part,i){return 0===i?part:part.toUpperFirst()})).join("")}var cssTimeToMS=(cssTimeRE=/^([+-]?(?:\d*\.)?\d+)([Mm]?[Ss])$/,function(cssTime){var match=cssTimeRE.exec(String(cssTime));if(null===match)throw new SyntaxError('invalid time value syntax: "'.concat(cssTime,'"'));var msec=Number(match[1]);if(1===match[2].length&&(msec*=1e3),Number.isNaN(msec)||!Number.isFinite(msec))throw new RangeError('invalid time value: "'.concat(cssTime,'"'));return msec}),cssTimeRE,decodeEntities=(escapedHtmlRE=/&(?:amp|#38|#x26|lt|#60|#x3c|gt|#62|#x3e|quot|#34|#x22|apos|#39|#x27|#96|#x60);/gi,hasEscapedHtmlRE=new RegExp(escapedHtmlRE.source,"i"),escapedHtmlTable=enumFrom({"&amp;":"&","&#38;":"&","&#x26;":"&","&lt;":"<","&#60;":"<","&#x3c;":"<","&gt;":">","&#62;":">","&#x3e;":">","&quot;":'"',"&#34;":'"',"&#x22;":'"',"&apos;":"'","&#39;":"'","&#x27;":"'","&#96;":"`","&#x60;":"`"}),function(str){if(null==str)return"";var val=String(str);return val&&hasEscapedHtmlRE.test(val)?val.replace(escapedHtmlRE,(function(entity){return escapedHtmlTable[entity.toLowerCase()]})):val}),escapedHtmlRE,hasEscapedHtmlRE,escapedHtmlTable,encodeEntities=(htmlCharsRE=/[&<>"'`]/g,hasHtmlCharsRE=new RegExp(htmlCharsRE.source),htmlCharsTable=enumFrom({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"}),function(str){if(null==str)return"";var val=String(str);return val&&hasHtmlCharsRE.test(val)?val.replace(htmlCharsRE,(function(ch){return htmlCharsTable[ch]})):val}),htmlCharsRE,hasHtmlCharsRE,htmlCharsTable,encodeMarkup=(markupCharsRE=/[!"#$&'*\-/<=>?@[\\\]^_`{|}~]/g,hasMarkupCharsRE=new RegExp(markupCharsRE.source),markupCharsTable=enumFrom({"!":"&#33;",'"':"&quot;","#":"&#35;",$:"&#36;","&":"&amp;","'":"&#39;","*":"&#42;","-":"&#45;","/":"&#47;","<":"&lt;","=":"&#61;",">":"&gt;","?":"&#63;","@":"&#64;","[":"&#91;","\\":"&#92;","]":"&#93;","^":"&#94;",_:"&#95;","`":"&#96;","{":"&#123;","|":"&#124;","}":"&#125;","~":"&#126;"}),function(str){if(null==str)return"";var val=String(str);return val&&hasMarkupCharsRE.test(val)?val.replace(markupCharsRE,(function(ch){return markupCharsTable[ch]})):val}),markupCharsRE,hasMarkupCharsRE,markupCharsTable,enquote=(unescapedDQuoteRE=/(^|[^\\])(")/g,unescapedSQuoteRE=/(^|[^\\])(')/g,function(string){for(var dqCount=0,sqCount=0,i=0;i<string.length;++i)switch(string[i]){case"\\":++i;break;case'"':++dqCount;break;case"'":++sqCount}if(0===dqCount)return'"'.concat(string,'"');if(0===sqCount)return"'".concat(string,"'");var quote=dqCount<=sqCount?'"':"'";return"".concat(quote).concat(string.replace('"'===quote?unescapedDQuoteRE:unescapedSQuoteRE,"$1\\$2")).concat(quote)}),unescapedDQuoteRE,unescapedSQuoteRE;function enumFrom(O){var pEnum=Object.create(null);if(O instanceof Array)O.forEach((function(val,i){return pEnum[String(val)]=i}));else if(O instanceof Set)Array.from(O).forEach((function(val,i){return pEnum[String(val)]=i}));else if(O instanceof Map)O.forEach((function(val,key){return pEnum[String(key)]=val}));else{if(null===O||"object"!==_typeof(O)||Object.getPrototypeOf(O)!==Object.prototype)throw new TypeError("enumFrom object parameter must be an Array, Map, Set, or generic object");Object.assign(pEnum,O)}return Object.freeze(Object.defineProperties(pEnum,{nameFrom:{value:function(needle){var entry=Object.entries(this).find((function(entry){return entry[1]===needle}));return entry?entry[0]:undefined}}}))}var exceptionFrom=(extraProps=Object.freeze(["code","data","result","stack","columnNumber","fileName","lineNumber","description","number"]),function(original,exceptionType,override){if(null===original||"object"!==_typeof(original))throw new Error("exceptionFrom original parameter must be an object");if("function"!=typeof exceptionType)throw new Error("exceptionFrom exceptionType parameter must be an error type constructor");var overrideType=_typeof(override);if("undefined"!==overrideType&&"string"!==overrideType&&"object"!==overrideType)throw new Error("exceptionFrom override parameter must be an object or string");var propValues=new Map;extraProps.forEach((function(name){void 0!==original[name]&&propValues.set(name,original[name])})),"string"===overrideType?propValues.set("message",override):"object"===overrideType&&null!==override&&Object.getOwnPropertyNames(override).forEach((function(name){void 0!==override[name]&&propValues.set(name,override[name])}));var ex=new exceptionType(propValues.get("message"));return propValues.delete("message"),propValues.forEach((function(value,name){void 0===ex[name]?Object.defineProperty(ex,name,{value:value,configurable:!0,writable:!0}):ex[name]=value})),ex}),extraProps;function getActiveElement(){try{return document.activeElement||null}catch(ex){return null}}function getErrorMessage(O){return null==O?"unknown error":"object"===_typeof(O)&&"message"in O?O.message:String(O)}var getToStringTag=(toString=Object.prototype.toString,slice=String.prototype.slice,"[object Object]"===toString.call(new Map)?function(O){return O instanceof Map?"Map":O instanceof Set?"Set":slice.call(toString.call(O),8,-1)}:function(O){return slice.call(toString.call(O),8,-1)}),toString,slice,getTypeOf=function(){var toString=Object.prototype.toString,slice=String.prototype.slice;return function(O){if(null===O)return"null";var baseType=_typeof(O);return"object"===baseType?slice.call(toString.call(O),8,-1):baseType}}(),hasMediaQuery="function"!=typeof window.matchMedia?function(){return!1}:function(mediaQuery){return window.matchMedia(mediaQuery).matches},isExternalLink=(externalUrlRE=new RegExp("^".concat(Patterns.externalUrl),"gim"),fingerprintRE=/[/\\?]/,function(link){return!Story.has(link)&&(externalUrlRE.test(link)||fingerprintRE.test(link))}),externalUrlRE,fingerprintRE;function msToCSSTime(msec){if("number"!=typeof msec||Number.isNaN(msec)||!Number.isFinite(msec)){var what;switch(_typeof(msec)){case"string":what='"'.concat(msec,'"');break;case"number":what=String(msec);break;default:what=getTypeOf(msec)}throw new TypeError("invalid milliseconds value: ".concat(what))}return"".concat(msec,"ms")}var now=(clock=Has.performance?performance:Date,function(){return clock.now()}),clock,onUserActivation=(uaEvents=Object.freeze(["keydown","mousedown","pointerdown","pointerup","touchend"]),function(namespace,callback){jQuery(document).off(namespace).on(uaEvents.map((function(name){return"".concat(name).concat(namespace)})).join(" "),(function(ev){callback(ev).then((function(){return jQuery(document).off(namespace)}),(function(ex){if("NotAllowedError"!==ex.name)throw jQuery(document).off(namespace),ex}))}))}),uaEvents;function parseURL(url){var parser=document.createElement("a"),searchParams=Object.create(null);parser.href=url,parser.search&&parser.search.replace(/^\?/,"").splitOrEmpty(/(?:&(?:amp;)?|;)/).forEach((function(query){var _query$split2=_slicedToArray(query.split("="),2),key=_query$split2[0],value=_query$split2[1];Object.hasOwn(searchParams,key)?searchParams[key].push(value):searchParams[key]=[value]}));var pathname=parser.host&&"/"!==parser.pathname[0]?"/".concat(parser.pathname):parser.pathname;return Object.freeze(Object.assign(Object.create(null),{href:parser.href,protocol:parser.protocol,host:parser.host,hostname:parser.hostname,port:parser.port,path:"".concat(pathname).concat(parser.search),pathname:pathname,search:parser.search,searchParams:Object.freeze(searchParams),hash:parser.hash}))}function sameValueZero(a,b){return a===b||a!=a&&b!=b}var scrubEventKey=function(){var separatorKey,decimalKey;if("undefined"!=typeof Intl&&"function"==typeof Intl.NumberFormat){var match=(new Intl.NumberFormat).format(111111.5).match(/(\D*)\d+(\D*)\d$/);match&&(separatorKey=match[1],decimalKey=match[2])}return separatorKey||decimalKey||(separatorKey=",",decimalKey="."),function(key){switch(key){case"Scroll":return"ScrollLock";case"Spacebar":return" ";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Up":return"ArrowUp";case"Down":return"ArrowDown";case"Del":return"Delete";case"Crsel":return"CrSel";case"Exsel":return"ExSel";case"Esc":return"Escape";case"Apps":return"ContextMenu";case"Nonconvert":return"NonConvert";case"MediaNextTrack":return"MediaTrackNext";case"MediaPreviousTrack":return"MediaTrackPrevious";case"VolumeUp":return"AudioVolumeUp";case"VolumeDown":return"AudioVolumeDown";case"VolumeMute":return"AudioVolumeMute";case"Zoom":return"ZoomToggle";case"SelectMedia":case"MediaSelect":return"LaunchMediaPlayer";case"Add":return"+";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Decimal":return decimalKey;case"Separator":return separatorKey}return key}}(),setDisplayTitle=function(title,isPlainText){if("string"!=typeof title)throw new TypeError("title parameter must be a string (received: ".concat(getTypeOf(title),")"));var render,text;isPlainText?text=render=title.trim():(render=document.createDocumentFragment(),new Wikifier(render,title,{noCleanup:!0}),text=function(source){for(var node,copy=source.cloneNode(!0),frag=document.createDocumentFragment();null!==(node=copy.firstChild);){if(node.nodeType===Node.ELEMENT_NODE)switch(node.nodeName.toUpperCase()){case"BR":case"DIV":case"P":frag.appendChild(document.createTextNode(" "))}frag.appendChild(node)}return frag.textContent}(render).trim()),document.title=Config.passages.displayTitles&&""!==State.passage&&State.passage!==Config.passages.start?"".concat(State.passage," | ").concat(text):text,jQuery("#story-title").empty().append(render)};function setPageElement(idOrElement,titles,defaultText){var el="object"===_typeof(idOrElement)?idOrElement:document.getElementById(idOrElement);if(null==el)return null;var ids=titles instanceof Array?titles:[titles];jQuery(el).empty();for(var i=0;i<ids.length;++i)if(Story.has(ids[i]))return new Wikifier(el,Story.get(ids[i]).processText().trim()),el;if(null!=defaultText){var text=String(defaultText).trim();""!==text&&new Wikifier(el,text)}return el}function stringFrom(value){switch(_typeof(value)){case"function":return"[function]";case"number":if(Number.isNaN(value))return"[number NaN]";break;case"object":if(null===value)return"[null]";if(value instanceof Array)return value.map((function(val){return stringFrom(val)})).join(", ");if(value instanceof Set)return Array.from(value).map((function(val){return stringFrom(val)})).join(", ");if(value instanceof Map){var result=Array.from(value).map((function(_ref5){var _ref6=_slicedToArray(_ref5,2),key=_ref6[0],val=_ref6[1];return"".concat(stringFrom(key)," → ").concat(stringFrom(val))}));return"{ ".concat(result.join(", ")," }")}if(value instanceof Date)return value.toLocaleString();if(value instanceof Element){if(value===document.documentElement||value===document.head||value===document.body)throw new Error("illegal operation; attempting to convert the <html>, <head>, or <body> tags to string is not allowed");return value.outerHTML}if(value instanceof Node)return value.textContent;break;case"symbol":var desc=void 0!==value.description?' "'.concat(value.description,'"'):"";return"[symbol".concat(desc,"]");case"undefined":return"[undefined]"}return String(value)}var triggerEvent=(createEvent=function(){try{return new CustomEvent("click",{bubbles:!0}),function(name,options){for(var _Object$assign=Object.assign({bubbles:!0,cancelable:!0,composed:!1},options),bubbles=_Object$assign.bubbles,cancelable=_Object$assign.cancelable,composed=_Object$assign.composed,detail=_Object$assign.detail,custom=_objectWithoutProperties(_Object$assign,_excluded),event=new CustomEvent(name,{bubbles:bubbles,cancelable:cancelable,composed:composed,detail:detail}),i=0,keys=Object.keys(custom);i<keys.length;++i){var key=keys[i];void 0!==custom[key]&&(event[key]=options[key])}return event}}catch(ex){return function(name,options){for(var _Object$assign2=Object.assign({bubbles:!0,cancelable:!0},options),bubbles=_Object$assign2.bubbles,cancelable=_Object$assign2.cancelable,custom=_objectWithoutProperties(_Object$assign2,_excluded2),event=document.createEvent("Event"),i=0,keys=Object.keys(custom);i<keys.length;++i){var key=keys[i];void 0!==custom[key]&&(event[key]=options[key])}return event.initEvent(name,bubbles,cancelable),event}}}(),function(name,targets,options){var event=createEvent(name,options),elems=[];if(targets)if(targets instanceof jQuery||targets instanceof NodeList||targets instanceof Array)for(var i=0;i<targets.length;++i)elems.push(targets[i]);else elems.push(targets);else elems.push(document);for(var _i5=0;_i5<elems.length;++_i5)elems[_i5].dispatchEvent(event)}),createEvent,SimpleStore=(_adapters=[],_initialized=null,Object.preventExtensions(Object.create(null,{adapters:{value:_adapters},create:{value:function(storageId,persistent){if(_initialized)return _initialized.create(storageId,persistent);for(var i=0;i<_adapters.length;++i)if(_adapters[i].init(storageId,persistent))return(_initialized=_adapters[i]).create(storageId,persistent);throw new Error("No valid storage adapters found")}}}))),_adapters,_initialized,_MAX_EXPIRY,_MIN_EXPIRY,_ok,CookieAdapter;SimpleStore.adapters.push(function(){var _ok=!1,WebStorageAdapter=function(){function WebStorageAdapter(storageId,persistent){_classCallCheck(this,WebStorageAdapter);var prefix="".concat(storageId,"."),engine=null,name=null;persistent?(engine=window.localStorage,name="localStorage"):(engine=window.sessionStorage,name="sessionStorage"),Object.defineProperties(this,{_engine:{value:engine},_prefix:{value:prefix},_prefixRe:{value:new RegExp("^".concat(RegExp.escape(prefix)))},name:{value:name},id:{value:storageId},persistent:{value:Boolean(persistent)}})}return _createClass(WebStorageAdapter,[{key:"size",get:function(){return this.keys().length}},{key:"keys",value:function(){for(var keys=[],i=0;i<this._engine.length;++i){var key=this._engine.key(i);this._prefixRe.test(key)&&keys.push(key.replace(this._prefixRe,""))}return keys}},{key:"has",value:function(key){return!("string"!=typeof key||!key)&&Object.hasOwn(this._engine,this._prefix+key)}},{key:"get",value:function(key){if("string"!=typeof key||!key)return null;var value=this._engine.getItem(this._prefix+key);return null==value?null:WebStorageAdapter._deserialize(value)}},{key:"set",value:function(key,value){if("string"!=typeof key||!key)return!1;try{this._engine.setItem(this._prefix+key,WebStorageAdapter._serialize(value))}catch(ex){if(isQuotaDOMException(ex))throw exceptionFrom(ex,Error,{cause:{origin:ex},message:"".concat(this.name," quota exceeded")});throw ex}return!0}},{key:"delete",value:function(key){return!("string"!=typeof key||!key)&&(this._engine.removeItem(this._prefix+key),!0)}},{key:"clear",value:function(){for(var keys=this.keys(),i=0,length=keys.length;i<length;++i)this.delete(keys[i]);return!0}}],[{key:"_serialize",value:function(obj){return LZString.compressToUTF16(Serial.stringify(obj))}},{key:"_deserialize",value:function(str){return Serial.parse(LZString.decompressFromUTF16(str))}}])}();var isQuotaErrorRE=/quota.?(?:exceeded|reached)/i;function isQuotaDOMException(ex){return ex instanceof DOMException&&(22===ex.code||1014===ex.code||isQuotaErrorRE.test(ex.name)||isQuotaErrorRE.test(ex.message))}return Object.preventExtensions(Object.create(null,{init:{value:function(){function hasWebStorage(storeId){var store;try{store=window[storeId];var val="_sc_".concat(String(Date.now()));store.setItem(val,val);var result=store.getItem(val)===val;return store.removeItem(val),result}catch(ex){return store&&0!==store.length&&isQuotaDOMException(ex)}}return _ok=hasWebStorage("localStorage")&&hasWebStorage("sessionStorage")}},create:{value:function(storageId,persistent){if(!_ok)throw new Error("adapter not initialized");return new WebStorageAdapter(storageId,persistent)}}}))}()),SimpleStore.adapters.push((_MAX_EXPIRY="Tue, 19 Jan 2038 03:14:07 GMT",_MIN_EXPIRY="Thu, 01 Jan 1970 00:00:00 GMT",_ok=!1,CookieAdapter=function(){function CookieAdapter(storageId,persistent){_classCallCheck(this,CookieAdapter);var prefix="".concat(storageId).concat(persistent?"!":"*",".");Object.defineProperties(this,{_prefix:{value:prefix},_prefixRe:{value:new RegExp("^".concat(RegExp.escape(prefix)))},name:{value:"cookie"},id:{value:storageId},persistent:{value:Boolean(persistent)}})}return _createClass(CookieAdapter,[{key:"size",get:function(){return this.keys().length}},{key:"keys",value:function(){if(""===document.cookie)return[];for(var cookies=document.cookie.split(/;\s*/),keys=[],i=0;i<cookies.length;++i){var kvPair=cookies[i].split("="),key=decodeURIComponent(kvPair[0]);this._prefixRe.test(key)&&""!==decodeURIComponent(kvPair[1])&&keys.push(key.replace(this._prefixRe,""))}return keys}},{key:"has",value:function(key){return!("string"!=typeof key||!key)&&null!==CookieAdapter._getCookie(this._prefix+key)}},{key:"get",value:function(key){if("string"!=typeof key||!key)return null;var value=CookieAdapter._getCookie(this._prefix+key);return null===value?null:CookieAdapter._deserialize(value)}},{key:"set",value:function(key,value){if("string"!=typeof key||!key)return!1;try{if(CookieAdapter._setCookie(this._prefix+key,CookieAdapter._serialize(value),this.persistent?_MAX_EXPIRY:undefined),!this.has(key))throw new Error("unknown validation error during set")}catch(ex){throw exceptionFrom(ex,Error,{cause:{origin:ex},message:"cookie error: ".concat(ex.message)})}return!0}},{key:"delete",value:function(key){if("string"!=typeof key||!key||!this.has(key))return!1;try{if(CookieAdapter._setCookie(this._prefix+key,undefined,_MIN_EXPIRY),this.has(key))throw new Error("unknown validation error during delete")}catch(ex){throw exceptionFrom(ex,Error,{cause:{origin:ex},message:"cookie error: ".concat(ex.message)})}return!0}},{key:"clear",value:function(){for(var keys=this.keys(),i=0,length=keys.length;i<length;++i)this.delete(keys[i]);return!0}}],[{key:"_getCookie",value:function(prefixedKey){if(!prefixedKey||""===document.cookie)return null;for(var cookies=document.cookie.split(/;\s*/),i=0;i<cookies.length;++i){var kvPair=cookies[i].split("=");if(prefixedKey===decodeURIComponent(kvPair[0]))return decodeURIComponent(kvPair[1])||null}return null}},{key:"_setCookie",value:function(prefixedKey,value,expiry){if(prefixedKey){var payload="".concat(encodeURIComponent(prefixedKey),"=");null!=value&&(payload+=encodeURIComponent(value)),null!=expiry&&(payload+="; expires=".concat(expiry)),payload+="; path=/",document.cookie=payload}}},{key:"_serialize",value:function(obj){return LZString.compressToBase64(Serial.stringify(obj))}},{key:"_deserialize",value:function(str){return Serial.parse(LZString.decompressFromBase64(str))}}])}(),Object.preventExtensions(Object.create(null,{init:{value:function(storageId){try{var tid="_sc_".concat(String(Date.now()));CookieAdapter._setCookie(tid,CookieAdapter._serialize(tid),undefined),_ok=CookieAdapter._deserialize(CookieAdapter._getCookie(tid))===tid,CookieAdapter._setCookie(tid,undefined,_MIN_EXPIRY)}catch(ex){_ok=!1}return _ok&&function(storageId){if(""!==document.cookie)for(var oldPrefix="".concat(storageId,"."),oldPrefixRe=new RegExp("^".concat(RegExp.escape(oldPrefix))),persistPrefix="".concat(storageId,"!."),sessionPrefix="".concat(storageId,"*."),sessionTestRe=/\.(?:state|rcWarn)$/,cookies=document.cookie.split(/;\s*/),_loop=function(){var kvPair=cookies[i].split("="),key=decodeURIComponent(kvPair[0]);if(oldPrefixRe.test(key)){var value=decodeURIComponent(kvPair[1]);if(""!==value){var persist=!sessionTestRe.test(key);CookieAdapter._setCookie(key,undefined,_MIN_EXPIRY),CookieAdapter._setCookie(key.replace(oldPrefixRe,(function(){return persist?persistPrefix:sessionPrefix})),value,persist?_MAX_EXPIRY:undefined)}}},i=0;i<cookies.length;++i)_loop()}(storageId),_ok}},create:{value:function(storageId,persistent){if(!_ok)throw new Error("adapter not initialized");return new CookieAdapter(storageId,persistent)}}}))));var DebugView=function(){function DebugView(parent,type,name,title){_classCallCheck(this,DebugView),Object.defineProperties(this,{parent:{value:parent},view:{value:document.createElement("span")},break:{value:document.createElement("wbr")}}),jQuery(this.view).attr({title:title,"aria-label":title,"data-type":null!=type?type:"","data-name":null!=name?name:""}).addClass("debug"),jQuery(this.break).addClass("debug hidden"),this.parent.appendChild(this.view),this.parent.appendChild(this.break)}return _createClass(DebugView,[{key:"output",get:function(){return this.view}},{key:"type",get:function(){return this.view.getAttribute("data-type")},set:function(type){this.view.setAttribute("data-type",null!=type?type:"")}},{key:"name",get:function(){return this.view.getAttribute("data-name")},set:function(name){this.view.setAttribute("data-name",null!=name?name:"")}},{key:"title",get:function(){return this.view.title},set:function(title){this.view.title=title}},{key:"append",value:function(el){return jQuery(this.view).append(el),this}},{key:"modes",value:function(options){if(null==options){var current={};return this.view.className.splitOrEmpty(/\s+/).forEach((function(name){"debug"!==name&&(current[name]=!0)})),current}if("object"===_typeof(options))return Object.keys(options).forEach((function(name){this[options[name]?"addClass":"removeClass"](name)}),jQuery(this.view)),this;throw new Error("DebugView.prototype.modes options parameter must be an object or null/undefined")}},{key:"remove",value:function(){var $view=jQuery(this.view);this.view.hasChildNodes()&&$view.contents().appendTo(this.parent),$view.remove(),jQuery(this.break).remove()}}],[{key:"isEnabled",value:function(){return"enabled"===jQuery(document.documentElement).attr("data-debug-view")}},{key:"enable",value:function(){jQuery(document.documentElement).attr("data-debug-view","enabled"),triggerEvent(":debugviewupdate")}},{key:"disable",value:function(){jQuery(document.documentElement).removeAttr("data-debug-view"),triggerEvent(":debugviewupdate")}},{key:"toggle",value:function(){DebugView.isEnabled()?DebugView.disable():DebugView.enable()}}])}(),NodeTyper=function(){return _createClass((function NodeTyper(config){if(_classCallCheck(this,NodeTyper),"object"!==_typeof(config)||null===config)throw new Error("config parameter must be an object (received: ".concat(getTypeOf(config),")"));if(!(Object.hasOwn(config,"targetNode")&&config.targetNode instanceof Node))throw new Error('config parameter object "targetNode" property must be a node');Object.defineProperties(this,{node:{value:config.targetNode},childNodes:{value:[]},nodeValue:{writable:!0,value:""},appendTo:{writable:!0,value:config.parentNode||null},classNames:{writable:!0,value:config.classNames||null},finished:{writable:!0,value:!1}});var childNode,node=this.node;for(node.nodeValue&&(this.nodeValue=node.nodeValue,node.nodeValue="");null!==(childNode=node.firstChild);)this.childNodes.push(new NodeTyper({targetNode:childNode,parentNode:node,classNames:this.classNames})),node.removeChild(childNode)}),[{key:"finish",value:function(){for(;this.type(!0););return!1}},{key:"type",value:function(flush){if(this.finished)return!1;if(this.appendTo){if(this.appendTo.appendChild(this.node),this.appendTo=null,this.node.nodeType!==Node.ELEMENT_NODE&&this.node.nodeType!==Node.TEXT_NODE||"none"===jQuery(this.node.parentNode).css("display"))return this.finish();this.node.parentNode&&this.classNames&&jQuery(this.node.parentNode).addClass(this.classNames)}if(this.nodeValue){if(flush)this.node.nodeValue+=this.nodeValue,this.nodeValue="";else{var _charAndPosAt=charAndPosAt(this.nodeValue,0),char=_charAndPosAt.char,start=_charAndPosAt.start,end=_charAndPosAt.end;this.node.nodeValue+=char,this.nodeValue=this.nodeValue.slice(1+end-start)}return!0}this.classNames&&(jQuery(this.node.parentNode).removeClass(this.classNames),this.classNames=null);for(var childNodes=this.childNodes;childNodes.length>0;){if(childNodes[0].type())return!0;childNodes.shift()}return this.finished=!0,!1}}])}(),StyleWrapper=(_imageMarkupRe=new RegExp(Patterns.cssImage,"g"),_hasImageMarkupRe=new RegExp(Patterns.cssImage),function(){return _createClass((function StyleWrapper(style){if(_classCallCheck(this,StyleWrapper),null==style)throw new TypeError("StyleWrapper style parameter must be an HTMLStyleElement object");Object.defineProperties(this,{style:{value:style}})}),[{key:"isEmpty",value:function(){return 0===this.style.cssRules.length}},{key:"set",value:function(rawCss){this.clear(),this.add(rawCss)}},{key:"add",value:function(rawCss){var css=rawCss;_hasImageMarkupRe.test(css)&&(_imageMarkupRe.lastIndex=0,css=css.replace(_imageMarkupRe,(function(wikiImage){var markup=Wikifier.helpers.parseSquareBracketedMarkup({source:wikiImage,matchStart:0});if(Object.hasOwn(markup,"error")||markup.pos<wikiImage.length)return wikiImage;var source=markup.source;if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(source=passage.text.trim())}return'url("'.concat(source.replace(/"/g,"%22"),'")')}))),this.style.styleSheet?this.style.styleSheet.cssText+=css:this.style.appendChild(document.createTextNode(css))}},{key:"clear",value:function(){this.style.styleSheet?this.style.styleSheet.cssText="":jQuery(this.style).empty()}}])}()),_imageMarkupRe,_hasImageMarkupRe,Diff=function(){var Op=enumFrom({Delete:0,SpliceArray:1,Copy:2,CopyDate:3});function isNumeric(O){var num;switch(_typeof(O)){case"number":num=O;break;case"string":num=Number(O);break;default:return!1}return!Number.isNaN(num)&&Number.isFinite(num)}return Object.preventExtensions(Object.create(null,{Op:{value:Op},diff:{value:function diff(a,b){for(var aOpKey,toString=Object.prototype.toString,aIsArray=a instanceof Array,delta=Object.create(null),keys=[].concat(_toConsumableArray(Object.keys(a)),_toConsumableArray(Object.keys(b))).sort().filter((function(val,i,arr){return 0===i||arr[i-1]!==val})),isAOpKey=function(key){return key===aOpKey},i=0,klen=keys.length;i<klen;++i){var key=keys[i],aVal=a[key],bVal=b[key];if(Object.hasOwn(a,key))if(Object.hasOwn(b,key)){if(aVal===bVal)continue;if(_typeof(aVal)===_typeof(bVal))if("function"==typeof aVal)aVal.toString()!==bVal.toString()&&(delta[key]=[Op.Copy,bVal]);else if("object"!==_typeof(aVal)||null===aVal)delta[key]=[Op.Copy,bVal];else{var aValType=toString.call(aVal);if(aValType===toString.call(bVal))if(aVal instanceof Date)aVal.getTime()!==bVal.getTime()&&(delta[key]=[Op.Copy,clone(bVal)]);else if(aVal instanceof Map)delta[key]=[Op.Copy,clone(bVal)];else if(aVal instanceof RegExp)aVal.toString()!==bVal.toString()&&(delta[key]=[Op.Copy,clone(bVal)]);else if(aVal instanceof Set)delta[key]=[Op.Copy,clone(bVal)];else if(aVal instanceof Array||"[object Object]"===aValType){var subDelta=diff(aVal,bVal);null!==subDelta&&(delta[key]=subDelta)}else delta[key]=[Op.Copy,clone(bVal)];else delta[key]=[Op.Copy,clone(bVal)]}else delta[key]=[Op.Copy,"object"!==_typeof(bVal)||null===bVal?bVal:clone(bVal)]}else if(aIsArray&&isNumeric(key)){var index=Number(key);if(!aOpKey){aOpKey="";do{aOpKey+="~"}while(keys.some(isAOpKey));delta[aOpKey]=[Op.SpliceArray,index,index]}index<delta[aOpKey][1]&&(delta[aOpKey][1]=index),index>delta[aOpKey][2]&&(delta[aOpKey][2]=index)}else delta[key]=Op.Delete;else delta[key]=[Op.Copy,"object"!==_typeof(bVal)||null===bVal?bVal:clone(bVal)]}return Object.keys(delta).length>0?delta:null}},patch:{value:function patch(orig,delta){for(var keys=delta?Object.keys(delta):[],patched=clone(orig),i=0,klen=keys.length;i<klen;++i){var key=keys[i],value=delta[key];if(value===Op.Delete)delete patched[key];else if(value instanceof Array)switch(value[0]){case Op.SpliceArray:patched.splice(value[1],value[2]-value[1]+1);break;case Op.Copy:patched[key]=clone(value[1]);break;case Op.CopyDate:patched[key]=new Date(value[1])}else patched[key]=patch(patched[key],value)}return patched}}}))}(),L10n=(replaceRE=/\{\w+\}/g,hasReplaceRE=new RegExp(replaceRE.source),Object.preventExtensions(Object.create(null,{init:{value:function(){}},get:{value:function(ids,overrides){if(!ids)return"";var id=(Array.isArray(ids)?ids:[ids]).find((function(id){return Object.hasOwn(l10nStrings,id)}));if(!id)return"";for(var value=l10nStrings[id],i=0;hasReplaceRE.test(value);){if(++i>50)throw new Error("L10n.get exceeded maximum replacement depth, probable infinite loop");replaceRE.lastIndex=0,value=value.replace(replaceRE,(function(replacement){var rid=replacement.slice(1,-1);return overrides&&Object.hasOwn(overrides,rid)?overrides[rid]:Object.hasOwn(l10nStrings,rid)?l10nStrings[rid]:void 0}))}return value}}}))),replaceRE,hasReplaceRE,l10nStrings={textAbort:"Abort",textAborting:"Aborting",textCancel:"Cancel",textClear:"Clear",textClose:"Close",textDelete:"Delete",textExport:"Export",textIdentity:"game",textImport:"Import",textLoad:"Load",textOff:"Off",textOk:"OK",textOn:"On",textSave:"Save",textTurn:"Turn",errorNonexistentPassage:'the passage "{passage}" does not exist',warningNoStorage:"All usable storage APIs are missing. Possible causes are a disabled third-party cookie setting, which also affects Web Storage, or a private browsing mode.",warningNoWebStorage:"The Web Storage API is missing, so this {textIdentity} is running in a degraded mode. You may be able to continue, however, some parts may not work properly.",warningDegraded:"Some capabilities required to support this {textIdentity} are missing, so it is running in a degraded mode. You may be able to continue, however, some parts may not work properly.",warningNoSaves:"Some capabilities required to support saves are missing, so saves have been disabled for this session.",saveErrorDisallowed:"Saving is currently disallowed.",saveErrorDecodeFail:"unable to decode save, likely due to corruption",saveErrorDiskLoadFail:"failed to load save file from disk",saveErrorIdMismatch:"save is from the wrong {textIdentity}",saveErrorInvalidData:"save is missing required data, likely due to corruption",saveErrorLoadTooEarly:"cannot load save this early",saveErrorNonexistent:"save does not exist",uiBarLabelToggle:"Toggle the UI bar",uiBarLabelBackward:"Go backward within the {textIdentity} history",uiBarLabelForward:"Go forward within the {textIdentity} history",uiBarLabelJumpto:"Jump to a specific point within the {textIdentity} history",alertTitle:"Alert",restartTitle:"Restart",restartMesgPrompt:"All unsaved progress will be lost. Are you sure that you want to restart?",continueTitle:"Continue",savesTitle:"Saves",savesHeaderBrowser:"In Browser",savesHeaderDisk:"On Disk",savesLabelBrowserClear:"Clear all browser saves",savesLabelBrowserExport:"Export browser saves to bundle",savesLabelBrowserImport:"Import browser saves from bundle",savesLabelDiskLoad:"Load from disk",savesLabelDiskSave:"Save to disk",savesTextBrowserAuto:"Auto",savesTextBrowserSlot:"Slot",savesTextNoDate:"unknown date",settingsTitle:"Settings",settingsTextReset:"Reset to Defaults",errorViewTitle:"Error",errorViewLabelToggle:"Toggle the error view",debugBarLabelToggle:"Toggle the debug bar",debugBarLabelViewsToggle:"Toggle the debug views",debugBarLabelWatchAdd:"Add a new watch",debugBarLabelWatchAll:"Watch all",debugBarLabelWatchClear:"Clear all watches",debugBarLabelWatchDelete:"Delete this watch",debugBarLabelWatchPlaceholder:"variable name",debugBarLabelPassagePlaceholder:"passage name",debugBarLabelPassagePlay:"Play passage",debugBarLabelWatchToggle:"Toggle the watch panel",debugBarMesgNoWatches:"No watches set",debugBarTextAdd:"Add",debugBarTextPassage:"Passage",debugBarTextViews:"Views",debugBarTextWatch:"Watch",macroBackText:"Back",macroReturnText:"Return",autoloadTitle:"Autoload",autoloadMesgPrompt:"An autosave exists. Load it now or go to the start?",autoloadTextCancel:"Go to start",autoloadTextOk:"Load autosave",jumptoTitle:"Jump To",jumptoMesgUnavailable:"No jump points currently available…",shareTitle:"Share"},Config=(_addVisitedLinkClass=!1,_cleanupWikifierOutput=!1,_debug=!1,_enableOptionalDebugging=!1,_loadDelay=0,_audioPauseOnFadeToZero=!0,_audioPreloadMetadata=!0,_historyControls=!0,_historyMaxStates=40,_macrosMaxLoopIterations=1e3,_macrosTypeSkipKey=" ",_macrosTypeVisitedPassages=!0,_passagesDisplayTitles=!1,_passagesNobr=!1,_savesMaxAuto=0,_savesMaxSlot=8,_uiStowBarInitially=800,_uiUpdateStoryElements=!0,errPassagesDescriptionsDeprecated="[DEPRECATED] Config.passages.descriptions has been deprecated, see Config.saves.descriptions instead",errSavesAutoloadDeprecated="[DEPRECATED] Config.saves.autoload has been deprecated, see the Save.browser.continue API instead",_baseSavesAutosaveDeprecated="[DEPRECATED] Config.saves.autosave has been deprecated",errSavesOnLoadDeprecated="[DEPRECATED] Config.saves.onLoad has been deprecated, see the Save.onLoad API instead",errSavesOnSaveDeprecated="[DEPRECATED] Config.saves.onSave has been deprecated, see the Save.onSave API instead",errSavesSlotsDeprecated="[DEPRECATED] Config.saves.slots has been deprecated, see Config.saves.maxSlotSaves instead",Object.freeze({get addVisitedLinkClass(){return _addVisitedLinkClass},set addVisitedLinkClass(value){_addVisitedLinkClass=Boolean(value)},get cleanupWikifierOutput(){return _cleanupWikifierOutput},set cleanupWikifierOutput(value){_cleanupWikifierOutput=Boolean(value)},get debug(){return _debug},set debug(value){_debug=Boolean(value)},get enableOptionalDebugging(){return _enableOptionalDebugging},set enableOptionalDebugging(value){_enableOptionalDebugging=Boolean(value)},get loadDelay(){return _loadDelay},set loadDelay(value){if(!Number.isSafeInteger(value)||value<0)throw new RangeError("Config.loadDelay must be a non-negative integer");_loadDelay=value},audio:Object.freeze({get pauseOnFadeToZero(){return _audioPauseOnFadeToZero},set pauseOnFadeToZero(value){_audioPauseOnFadeToZero=Boolean(value)},get preloadMetadata(){return _audioPreloadMetadata},set preloadMetadata(value){_audioPreloadMetadata=Boolean(value)}}),history:Object.freeze({get controls(){return _historyControls},set controls(value){var controls=Boolean(value);if(1===_historyMaxStates&&controls)throw new Error("Config.history.controls must be false when Config.history.maxStates is 1");_historyControls=controls},get maxStates(){return _historyMaxStates},set maxStates(value){if(!Number.isSafeInteger(value)||value<1)throw new RangeError("Config.history.maxStates must be a positive integer");_historyMaxStates=value,_historyControls&&1===value&&(_historyControls=!1)}}),macros:Object.freeze({get maxLoopIterations(){return _macrosMaxLoopIterations},set maxLoopIterations(value){if(!Number.isSafeInteger(value)||value<1)throw new RangeError("Config.macros.maxLoopIterations must be a positive integer");_macrosMaxLoopIterations=value},get typeSkipKey(){return _macrosTypeSkipKey},set typeSkipKey(value){_macrosTypeSkipKey=String(value)},get typeVisitedPassages(){return _macrosTypeVisitedPassages},set typeVisitedPassages(value){_macrosTypeVisitedPassages=Boolean(value)},get ifAssignmentError(){throw new Error("[DEPRECATED] Config.macros.ifAssignmentError has been deprecated, see Config.enableOptionalDebugging instead")},set ifAssignmentError(value){console.warn("[DEPRECATED] Config.macros.ifAssignmentError has been deprecated, see Config.enableOptionalDebugging instead"),Config.enableOptionalDebugging=value}}),navigation:Object.freeze({get override(){return _navigationOverride},set override(value){if(!(null==value||value instanceof Function))throw new TypeError("Config.navigation.override must be a function or null/undefined (received: ".concat(getTypeOf(value),")"));_navigationOverride=value}}),passages:Object.freeze({get displayTitles(){return _passagesDisplayTitles},set displayTitles(value){_passagesDisplayTitles=Boolean(value)},get nobr(){return _passagesNobr},set nobr(value){_passagesNobr=Boolean(value)},get onProcess(){return _passagesOnProcess},set onProcess(value){if(null!=value){var valueType=getTypeOf(value);if("function"!==valueType)throw new TypeError("Config.passages.onProcess must be a function or null/undefined (received: ".concat(valueType,")"))}_passagesOnProcess=value},get start(){return _passagesStart},set start(value){if(null!=value){var valueType=getTypeOf(value);if("string"!==valueType)throw new TypeError("Config.passages.start must be a string or null/undefined (received: ".concat(valueType,")"))}_passagesStart=value},get transitionOut(){return _passagesTransitionOut},set transitionOut(value){if(null!=value){var valueType=getTypeOf(value);if("string"!==valueType&&("number"!==valueType||!Number.isSafeInteger(value)||value<0))throw new TypeError("Config.passages.transitionOut must be a string, non-negative integer, or null/undefined (received: ".concat(valueType,")"))}_passagesTransitionOut=value},get descriptions(){throw new Error(errPassagesDescriptionsDeprecated)},set descriptions(value){switch(console.warn(errPassagesDescriptionsDeprecated),_typeof(value)){case"boolean":value&&!Config.saves.descriptions&&(Config.saves.descriptions=function(){return State.passage});break;case"function":Config.saves.descriptions||(Config.saves.descriptions=value);break;case"undefined":case"object":if(value&&!Config.saves.descriptions){var dict=value;Config.saves.descriptions=function(){return Object.hasOwn(dict,State.passage)&&dict[State.passage]}}break;default:throw new TypeError("Config.passages.descriptions must be a boolean, object, function, or null/undefined (received: ".concat(getTypeOf(value),")"))}}}),saves:Object.freeze({get descriptions(){return _savesDescriptions},set descriptions(value){if(!(null==value||value instanceof Function))throw new TypeError("Config.saves.descriptions must be a function or null/undefined (received: ".concat(getTypeOf(value),")"));_savesDescriptions=value},get id(){return _savesId},set id(value){if("string"!=typeof value||""===value)throw new TypeError("Config.saves.id must be a non-empty string (received: ".concat(getTypeOf(value),")"));_savesId=value},get isAllowed(){return _savesIsAllowed},set isAllowed(value){if(!(null==value||value instanceof Function))throw new TypeError("Config.saves.isAllowed must be a function or null/undefined (received: ".concat(getTypeOf(value),")"));_savesIsAllowed=value},get maxAutoSaves(){return _savesMaxAuto},set maxAutoSaves(value){if(!Number.isInteger(value))throw new TypeError("Config.saves.maxAutoSaves must be an integer");if(value<0||value>Save.MAX_INDEX+1)throw new RangeError("Config.saves.maxAutoSaves out of bounds (range: 0–".concat(Save.MAX_INDEX+1,"; received: ").concat(value,")"));_savesMaxAuto=value},get maxSlotSaves(){return _savesMaxSlot},set maxSlotSaves(value){if(!Number.isInteger(value))throw new TypeError("Config.saves.maxSlotSaves must be an integer");if(value<0||value>Save.MAX_INDEX+1)throw new RangeError("Config.saves.maxSlotSaves out of bounds (range: 0–".concat(Save.MAX_INDEX+1,"; received: ").concat(value,")"));_savesMaxSlot=value},get metadata(){return _savesMetadata},set metadata(value){if(!(null==value||value instanceof Function))throw new TypeError("Config.saves.metadata must be a function or null/undefined (received: ".concat(getTypeOf(value),")"));_savesMetadata=value},get version(){return _savesVersion},set version(value){_savesVersion=value},get _internal_autoload_(){return _savesAutoload},get autoload(){return console.warn(errSavesAutoloadDeprecated),_savesAutoload},set autoload(value){if(console.warn(errSavesAutoloadDeprecated),null!=value){var valueType=getTypeOf(value);if("boolean"!==valueType&&("string"!==valueType||"prompt"!==value)&&"function"!==valueType)throw new TypeError("Config.saves.autoload must be a boolean, string ('prompt'), function, or null/undefined (received: ".concat(valueType,")"))}_savesAutoload=value},get autosave(){throw new Error("".concat(_baseSavesAutosaveDeprecated,", see Config.saves.maxAutoSaves and Config.saves.isAllowed instead"))},set autosave(value){switch(_typeof(value)){case"boolean":console.warn("".concat(_baseSavesAutosaveDeprecated,", for boolean usage see Config.saves.maxAutoSaves instead"));break;case"function":if(console.warn("".concat(_baseSavesAutosaveDeprecated,", for function usage see Config.saves.isAllowed instead")),!Config.saves.isAllowed){var callback=value;Config.saves.isAllowed=function(saveType){return saveType!==Save.Type.Auto||callback(saveType)}}break;default:if(console.warn("".concat(_baseSavesAutosaveDeprecated,", for tag usage see Config.saves.isAllowed instead")),!(value instanceof Array)||0===value.length||value.some((function(tag){return"string"!=typeof tag}))){var valueType=getTypeOf(value);throw new TypeError("Config.saves.autosave must be a boolean, Array<string>, function, or null/undefined (received: ".concat(valueType).concat("Array"===valueType?"<any>":"",")"))}if(!Config.saves.isAllowed){var userTags=value;Config.saves.isAllowed=function(saveType){return saveType!==Save.Type.Auto||userTags.includesAny(Story.get(State.passage).tags)}}}0===Config.saves.maxAutoSaves&&(Config.saves.maxAutoSaves=1)},get onLoad(){throw new Error(errSavesOnLoadDeprecated)},set onLoad(value){console.warn(errSavesOnLoadDeprecated),Save.onLoad.add(value)},get onSave(){throw new Error(errSavesOnSaveDeprecated)},set onSave(value){console.warn(errSavesOnSaveDeprecated),Save.onSave.add(value)},get slots(){throw new Error(errSavesSlotsDeprecated)},set slots(value){console.warn(errSavesSlotsDeprecated),Config.saves.maxSlotSaves=value},get tryDiskOnMobile(){return console.warn("[DEPRECATED] Config.saves.tryDiskOnMobile has been deprecated"),!0},set tryDiskOnMobile(value){console.warn("[DEPRECATED] Config.saves.tryDiskOnMobile has been deprecated")}}),ui:Object.freeze({get stowBarInitially(){return _uiStowBarInitially},set stowBarInitially(value){var valueType=getTypeOf(value);if("boolean"!==valueType&&("number"!==valueType||!Number.isSafeInteger(value)||value<0))throw new TypeError("Config.ui.stowBarInitially must be a boolean or non-negative integer (received: ".concat(valueType,")"));_uiStowBarInitially=value},get updateStoryElements(){return _uiUpdateStoryElements},set updateStoryElements(value){_uiUpdateStoryElements=Boolean(value)}})})),_navigationOverride,_passagesStart,_passagesOnProcess,_passagesTransitionOut,_savesDescriptions,_savesId,_savesIsAllowed,_savesMetadata,_savesVersion,_savesAutoload,_addVisitedLinkClass,_cleanupWikifierOutput,_debug,_enableOptionalDebugging,_loadDelay,_audioPauseOnFadeToZero,_audioPreloadMetadata,_historyControls,_historyMaxStates,_macrosMaxLoopIterations,_macrosTypeSkipKey,_macrosTypeVisitedPassages,_passagesDisplayTitles,_passagesNobr,_savesMaxAuto,_savesMaxSlot,_uiStowBarInitially,_uiUpdateStoryElements,errPassagesDescriptionsDeprecated,errSavesAutoloadDeprecated,_baseSavesAutosaveDeprecated,errSavesOnLoadDeprecated,errSavesOnSaveDeprecated,errSavesSlotsDeprecated,SimpleAudio=function(){var _hasPromise,_specialIds=Object.freeze([":not",":all",":looped",":muted",":paused",":playing",":stopped"]),_formatSpecRe=/^([\w-]+)\s*\|\s*(\S.*)$/,_badIdRe=/[:\s]/,_tracks=new Map,_groups=new Map,_lists=new Map,_subscribers=new Map,_masterRate=1,_masterVolume=1,_masterMute=!1,_masterMuteOnHidden=!1,_playReturnsPromise=(_hasPromise=null,function(){if(null!==_hasPromise)return _hasPromise;if(_hasPromise=!1,Has.audio)try{var audio=document.createElement("audio");audio.muted=!0;var value=audio.play();value.catch((function(){})),_hasPromise=value instanceof Promise}catch(ex){}return _hasPromise}),AudioTrack=function(){function AudioTrack(obj){if(_classCallCheck(this,AudioTrack),obj instanceof Array)this._create(obj);else{if(!(obj instanceof AudioTrack))throw new Error("sources parameter must be either an array, of URIs or source objects, or an AudioTrack instance");this._copy(obj)}}return _createClass(AudioTrack,[{key:"_create",value:function(sourceList){var dataUriRe=/^data:\s*audio\/(?:x-)?([^;,]+)\s*[;,]/i,extRe=/\.([^./\\]+)$/,formats=AudioTrack.formats,usedSources=[],audio=document.createElement("audio");audio.preload="none",sourceList.forEach((function(src){var srcUri=null;switch(_typeof(src)){case"string":var match;if("data:"===src.slice(0,5)){if(null===(match=dataUriRe.exec(src)))throw new Error("source data URI missing media type")}else if(null===(match=extRe.exec(parseURL(src).pathname)))throw new Error("source URL missing file extension");formats[match[1]]&&(srcUri=src);break;case"object":if(null===src)throw new Error("source object cannot be null");if(!Object.hasOwn(src,"src"))throw new Error('source object missing required "src" property');if(!Object.hasOwn(src,"format"))throw new Error('source object missing required "format" property');formats[src.format]&&(srcUri=src.src);break;default:throw new Error("invalid source value (type: ".concat(_typeof(src),")"))}if(null!==srcUri){var source=document.createElement("source");source.src=srcUri,audio.appendChild(source),usedSources.push(srcUri)}})),audio.hasChildNodes()&&Config.audio.preloadMetadata&&(audio.preload="metadata"),this._finalize(audio,usedSources,clone(sourceList))}},{key:"_copy",value:function(obj){this._finalize(obj.audio.cloneNode(!0),clone(obj.sources),clone(obj.originals))}},{key:"_finalize",value:function(audio,sources,originals){var _this=this;Object.defineProperties(this,{audio:{configurable:!0,value:audio},sources:{value:Object.freeze(sources)},originals:{value:Object.freeze(originals)},_error:{writable:!0,value:!1},_faderId:{writable:!0,value:null},_mute:{writable:!0,value:!1},_rate:{writable:!0,value:1},_volume:{writable:!0,value:1}}),jQuery(this.audio).on("loadstart.AudioTrack",(function(){return _this._error=!1})).on("error.AudioTrack",(function(){return _this._error=!0})).find("source:last-of-type").on("error.AudioTrack",(function(){return _this._trigger("error")})),function(id,callback){if("function"!=typeof callback)throw new Error("callback parameter must be a function");_subscribers.set(id,callback)}(this,(function(mesg){if(_this.audio)switch(mesg){case"loadwithscreen":if(_this.hasSource()){var lockId=LoadScreen.lock();_this.off(".AudioTrack_loadwithscreen").one("canplaythrough.AudioTrack_loadwithscreen error.AudioTrack_loadwithscreen",(function(){jQuery(this).off(".AudioTrack_loadwithscreen"),LoadScreen.unlock(lockId)})).load()}break;case"load":_this.load();break;case"mute":_this._updateAudioMute();break;case"rate":_this._updateAudioRate();break;case"stop":_this.stop();break;case"volume":_this._updateAudioVolume();break;case"unload":_this.unload()}else unsubscribe(_this)})),this._updateAudioMute(),this._updateAudioRate(),this._updateAudioVolume()}},{key:"_trigger",value:function(eventName){triggerEvent(eventName,this.audio,{bubbles:!1})}},{key:"_destroy",value:function(){unsubscribe(this),this.audio&&(jQuery(this.audio).off(),this.unload(),this._error=!0,delete this.audio)}},{key:"clone",value:function(){return new AudioTrack(this)}},{key:"load",value:function(){var _this2=this;if(this.fadeStop(),this.audio.pause(),!this.audio.hasChildNodes()){if(0===this.sources.length)return;this.sources.forEach((function(srcUri){var source=document.createElement("source");source.src=srcUri,_this2.audio.appendChild(source)}))}"auto"!==this.audio.preload&&(this.audio.preload="auto"),this.isLoading()||this.audio.load()}},{key:"unload",value:function(){this.fadeStop(),this.stop();var audio=this.audio;for(audio.preload="none";audio.hasChildNodes();)audio.removeChild(audio.firstChild);audio.load()}},{key:"play",value:function(){var _this3=this;if(!this.hasSource())return Promise.reject(new Error("none of the candidate sources were acceptable"));if(this.isUnloaded())return Promise.reject(new Error("no sources are loaded"));if(this.isFailed())return Promise.reject(new Error("failed to load any of the sources"));"auto"!==this.audio.preload&&(this.audio.preload="auto");var namespace=".AudioTrack_play";return _playReturnsPromise()?this.audio.play():new Promise((function(resolve,reject){_this3.isPlaying()?resolve():(jQuery(_this3.audio).off(namespace).one("error".concat(namespace," playing").concat(namespace," timeupdate").concat(namespace),(function(ev){jQuery(_this3.audio).off(namespace),"error"===ev.type?reject(new Error("unknown audio play error")):resolve()})),_this3.audio.play())}))}},{key:"playWhenAllowed",value:function(){var _this4=this;return this.play().catch((function(ex){if("NotAllowedError"!==ex.name)throw ex;onUserActivation(".AudioTrack_playWhenAllowed",(function(){return _this4.audio.play()}))}))}},{key:"pause",value:function(){this.audio.pause()}},{key:"stop",value:function(){this.audio.pause(),this.time(0),this._trigger(":stopped")}},{key:"fade",value:function(duration,toVol,fromVol){var _this5=this;if("number"!=typeof duration)throw new TypeError("duration parameter must be a number");if("number"!=typeof toVol)throw new TypeError("toVolume parameter must be a number");if(null!=fromVol&&"number"!=typeof fromVol)throw new TypeError("fromVolume parameter must be a number");if(!this.hasSource())return Promise.reject(new Error("none of the candidate sources were acceptable"));if(this.isUnloaded())return Promise.reject(new Error("no sources are loaded"));if(this.isFailed())return Promise.reject(new Error("failed to load any of the sources"));this.fadeStop();var from=Math.clamp(null==fromVol?this.volume():fromVol,0,1),to=Math.clamp(toVol,0,1);return from!==to?(this.volume(from),jQuery(this.audio).off("timeupdate.AudioTrack_fade").one("timeupdate.AudioTrack_fade",(function(){var min,max;from<to?(min=from,max=to):(min=to,max=from);var time=Math.max(duration,1),delta=(to-from)/(time/.025);_this5._trigger(":fading"),_this5._faderId=setInterval((function(){_this5.isPlaying()?(_this5.volume(Math.clamp(_this5.volume()+delta,min,max)),Config.audio.pauseOnFadeToZero&&0===_this5.volume()&&_this5.pause(),_this5.volume()===to&&(_this5.fadeStop(),_this5._trigger(":faded"))):_this5.fadeStop()}),25)})),this.play()):void 0}},{key:"fadeIn",value:function(duration,fromVol){return this.fade(duration,1,fromVol)}},{key:"fadeOut",value:function(duration,fromVol){return this.fade(duration,0,fromVol)}},{key:"fadeStop",value:function(){null!==this._faderId&&(clearInterval(this._faderId),this._faderId=null)}},{key:"loop",value:function(_loop2){return null==_loop2?this.audio.loop:(this.audio.loop=!!_loop2,this)}},{key:"mute",value:function(_mute){return null==_mute?this._mute:(this._mute=!!_mute,this._updateAudioMute(),this)}},{key:"_updateAudioMute",value:function(){this.audio.muted=this._mute||_masterMute}},{key:"rate",value:function(_rate){if(null==_rate)return this._rate;if("number"!=typeof _rate)throw new TypeError("rate parameter must be a number");return this._rate=Math.clamp(_rate,.2,5),this._updateAudioRate(),this}},{key:"_updateAudioRate",value:function(){this.audio.playbackRate=Math.clamp(this._rate*_masterRate,.2,5)}},{key:"time",value:function(_time){var _this6=this;if(null==_time)return this.audio.currentTime;if("number"!=typeof _time)throw new TypeError("time parameter must be a number");return this.hasMetadata()?this.audio.currentTime=_time:jQuery(this.audio).off("loadedmetadata.AudioTrack_time").one("loadedmetadata.AudioTrack_time",(function(){return _this6.audio.currentTime=_time})),this}},{key:"volume",value:function(_volume){if(null==_volume)return this._volume;if("number"!=typeof _volume)throw new TypeError("volume parameter must be a number");return this._volume=Math.clamp(_volume,0,1),this._updateAudioVolume(),this}},{key:"_updateAudioVolume",value:function(){this.audio.volume=Math.clamp(this._volume*_masterVolume,0,1)}},{key:"duration",value:function(){return this.audio.duration}},{key:"remaining",value:function(){return this.audio.duration-this.audio.currentTime}},{key:"isFailed",value:function(){return this._error}},{key:"isLoading",value:function(){return this.audio.networkState===HTMLMediaElement.NETWORK_LOADING}},{key:"isUnloaded",value:function(){return!this.audio.hasChildNodes()}},{key:"isUnavailable",value:function(){return!this.hasSource()||this.isUnloaded()||this.isFailed()}},{key:"isPlaying",value:function(){return!this.audio.paused&&this.hasSomeData()}},{key:"isPaused",value:function(){return this.audio.paused&&(this.audio.duration===1/0||this.audio.currentTime>0)&&!this.audio.ended}},{key:"isStopped",value:function(){return this.audio.paused&&0===this.audio.currentTime}},{key:"isEnded",value:function(){return this.audio.ended}},{key:"isFading",value:function(){return null!==this._faderId}},{key:"isSeeking",value:function(){return this.audio.seeking}},{key:"hasSource",value:function(){return this.sources.length>0}},{key:"hasNoData",value:function(){return this.audio.readyState===HTMLMediaElement.HAVE_NOTHING}},{key:"hasMetadata",value:function(){return this.audio.readyState>=HTMLMediaElement.HAVE_METADATA}},{key:"hasSomeData",value:function(){return this.audio.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA}},{key:"hasData",value:function(){return this.audio.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA}},{key:"on",value:function(){for(var _len5=arguments.length,args=new Array(_len5),_key5=0;_key5<_len5;_key5++)args[_key5]=arguments[_key5];return jQuery.fn.on.apply(jQuery(this.audio),args),this}},{key:"one",value:function(){for(var _len6=arguments.length,args=new Array(_len6),_key6=0;_key6<_len6;_key6++)args[_key6]=arguments[_key6];return jQuery.fn.one.apply(jQuery(this.audio),args),this}},{key:"off",value:function(){for(var _len7=arguments.length,args=new Array(_len7),_key7=0;_key7<_len7;_key7++)args[_key7]=arguments[_key7];return jQuery.fn.off.apply(jQuery(this.audio),args),this}}])}();Object.defineProperties(AudioTrack,{formats:{value:function(){var audio=document.createElement("audio"),types=new Map;function canPlay(mimeType){return types.has(mimeType)||types.set(mimeType,""!==audio.canPlayType(mimeType).replace(/^no$/i,"")),types.get(mimeType)}return Object.assign(Object.create(null),{aac:canPlay("audio/aac"),caf:canPlay("audio/x-caf")||canPlay("audio/caf"),flac:canPlay("audio/x-flac")||canPlay("audio/flac"),mp3:canPlay('audio/mpeg; codecs="mp3"')||canPlay("audio/mpeg")||canPlay("audio/mp3")||canPlay("audio/mpa"),mpeg:canPlay("audio/mpeg"),m4a:canPlay("audio/x-m4a")||canPlay("audio/m4a")||canPlay("audio/aac"),mp4:canPlay("audio/x-mp4")||canPlay("audio/mp4")||canPlay("audio/aac"),ogg:canPlay("audio/ogg"),oga:canPlay("audio/ogg"),opus:canPlay('audio/ogg; codecs="opus"')||canPlay("audio/opus"),wav:canPlay('audio/wave; codecs="1"')||canPlay('audio/wav; codecs="1"')||canPlay("audio/wave")||canPlay("audio/wav"),wave:canPlay('audio/wave; codecs="1"')||canPlay('audio/wav; codecs="1"')||canPlay("audio/wave")||canPlay("audio/wav"),weba:canPlay("audio/webm"),webm:canPlay("audio/webm")})}()}});var AudioList=function(){return _createClass((function AudioList(obj){if(_classCallCheck(this,AudioList),obj instanceof Array)this._create(obj);else{if(!(obj instanceof AudioList))throw new Error("tracks parameter must be either an array, of track objects, or an AudioTrack instance");this._copy(obj)}}),[{key:"_create",value:function(trackList){var _this7=this;this._finalize(trackList.map((function(trackObj){if("object"!==_typeof(trackObj))throw new Error("tracks parameter array members must be objects");var own,rate,track,volume;if(trackObj instanceof AudioTrack)own=!0,rate=trackObj.rate(),track=trackObj.clone(),volume=trackObj.volume();else{if(!Object.hasOwn(trackObj,"track"))throw new Error('track object missing required "track" property');if(!(trackObj.track instanceof AudioTrack))throw new Error('track object\'s "track" property must be an AudioTrack object');own=Object.hasOwn(trackObj,"own")&&trackObj.own,rate=Object.hasOwn(trackObj,"rate")?trackObj.rate:trackObj.track.rate(),track=trackObj.track,volume=Object.hasOwn(trackObj,"volume")?trackObj.volume:trackObj.track.volume()}return track.stop(),track.loop(!1),track.mute(!1),track.rate(rate),track.volume(volume),track.on("ended.AudioList",(function(){return _this7._onEnd()})),{own:own,track:track,volume:volume,rate:rate}})))}},{key:"_copy",value:function(obj){this._finalize(clone(obj.tracks))}},{key:"_finalize",value:function(tracks){Object.defineProperties(this,{tracks:{configurable:!0,value:Object.freeze(tracks)},queue:{configurable:!0,value:[]},current:{writable:!0,value:null},_rate:{writable:!0,value:1},_volume:{writable:!0,value:1},_mute:{writable:!0,value:!1},_loop:{writable:!0,value:!1},_shuffle:{writable:!0,value:!1}})}},{key:"_destroy",value:function(){this.stop(),this.tracks.filter((function(trackObj){return trackObj.own})).forEach((function(trackObj){return trackObj.track._destroy()})),delete this.tracks,delete this.queue}},{key:"load",value:function(){this.tracks.forEach((function(trackObj){return trackObj.track.load()}))}},{key:"unload",value:function(){this.stop(),this.tracks.forEach((function(trackObj){return trackObj.track.unload()}))}},{key:"play",value:function(){return null!==this.current&&!this.current.track.isUnavailable()&&!this.current.track.isEnded()||(0===this.queue.length&&this._fillQueue(),this._next())?this.current.track.play():Promise.reject(new Error("no tracks were available"))}},{key:"playWhenAllowed",value:function(){var _this8=this;return this.play().catch((function(ex){if("NotAllowedError"!==ex.name)throw ex;onUserActivation(".AudioList_playWhenAllowed",(function(){return _this8.play()}))}))}},{key:"pause",value:function(){null!==this.current&&this.current.track.pause()}},{key:"stop",value:function(){null!==this.current&&(this.current.track.stop(),this.current=null),this._drainQueue()}},{key:"skip",value:function(){this._next()?this.current.track.play():this._loop&&this.play()}},{key:"fade",value:function(duration,toVol,fromVol){if("number"!=typeof duration)throw new TypeError("duration parameter must be a number");if("number"!=typeof toVol)throw new TypeError("toVolume parameter must be a number");if(null!=fromVol&&"number"!=typeof fromVol)throw new TypeError("fromVolume parameter must be a number");if(0===this.queue.length&&this._fillQueue(),null!==this.current&&!this.current.track.isUnavailable()&&!this.current.track.isEnded()||this._next()){var adjFromVol,adjToVol=Math.clamp(toVol,0,1)*this.current.volume;return null!=fromVol&&(adjFromVol=Math.clamp(fromVol,0,1)*this.current.volume),this._volume=toVol,this.current.track.fade(duration,adjToVol,adjFromVol)}}},{key:"fadeIn",value:function(duration,fromVol){return this.fade(duration,1,fromVol)}},{key:"fadeOut",value:function(duration,fromVol){return this.fade(duration,0,fromVol)}},{key:"fadeStop",value:function(){null!==this.current&&this.current.track.fadeStop()}},{key:"loop",value:function(_loop3){return null==_loop3?this._loop:(this._loop=!!_loop3,this)}},{key:"mute",value:function(_mute2){return null==_mute2?this._mute:(this._mute=!!_mute2,null!==this.current&&this.current.track.mute(this._mute),this)}},{key:"rate",value:function(_rate2){if(null==_rate2)return this._rate;if("number"!=typeof _rate2)throw new TypeError("rate parameter must be a number");return this._rate=Math.clamp(_rate2,.2,5),null!==this.current&&this.current.track.rate(this._rate*this.current.rate),this}},{key:"shuffle",value:function(_shuffle){var _this9=this;if(null==_shuffle)return this._shuffle;if(this._shuffle=!!_shuffle,this.queue.length>0&&(this._fillQueue(),!this._shuffle&&null!==this.current&&this.queue.length>1)){var _this$queue,firstIndex=this.queue.findIndex((function(trackObj){return trackObj===_this9.current}));if(-1!==firstIndex)(_this$queue=this.queue).push.apply(_this$queue,_toConsumableArray(this.queue.splice(0,firstIndex+1)))}return this}},{key:"volume",value:function(_volume2){if(null==_volume2)return this._volume;if("number"!=typeof _volume2)throw new TypeError("volume parameter must be a number");return this._volume=Math.clamp(_volume2,0,1),null!==this.current&&this.current.track.volume(this._volume*this.current.volume),this}},{key:"duration",value:function(){if(arguments.length>0)throw new Error("duration takes no parameters");return this.tracks.map((function(trackObj){return trackObj.track.duration()})).reduce((function(prev,cur){return prev+cur}),0)}},{key:"remaining",value:function(){if(arguments.length>0)throw new Error("remaining takes no parameters");var remainingTime=this.queue.map((function(trackObj){return trackObj.track.duration()})).reduce((function(prev,cur){return prev+cur}),0);return null!==this.current&&(remainingTime+=this.current.track.remaining()),remainingTime}},{key:"time",value:function(){if(arguments.length>0)throw new Error("time takes no parameters");return this.duration()-this.remaining()}},{key:"isPlaying",value:function(){return null!==this.current&&this.current.track.isPlaying()}},{key:"isPaused",value:function(){return null===this.current||this.current.track.isPaused()}},{key:"isStopped",value:function(){return 0===this.queue.length&&null===this.current}},{key:"isEnded",value:function(){return 0===this.queue.length&&(null===this.current||this.current.track.isEnded())}},{key:"isFading",value:function(){return null!==this.current&&this.current.track.isFading()}},{key:"_next",value:function(){var nextTrack;for(null!==this.current&&(this.current.track.stop(),this.current=null);nextTrack=this.queue.shift();)if(!nextTrack.track.isUnavailable()){this.current=nextTrack;break}return null!==this.current&&(this.current.track.mute(this._mute),this.current.track.rate(this._rate*this.current.rate),this.current.track.volume(this._volume*this.current.volume),this.current.track.loop(!1),!0)}},{key:"_onEnd",value:function(){if(0===this.queue.length){if(!this._loop)return;this._fillQueue()}this._next()&&this.current.track.play()}},{key:"_drainQueue",value:function(){this.queue.splice(0)}},{key:"_fillQueue",value:function(){var _this$queue2;this._drainQueue(),(_this$queue2=this.queue).push.apply(_this$queue2,_toConsumableArray(this.tracks.filter((function(trackObj){return!trackObj.track.isUnavailable()})))),0!==this.queue.length&&this._shuffle&&(this.queue.shuffle(),this.queue.length>1&&this.queue[0]===this.current&&this.queue.push(this.queue.shift()))}}])}(),AudioRunner=function(){function AudioRunner(list){if(_classCallCheck(this,AudioRunner),!(list instanceof Set||list instanceof AudioRunner))throw new TypeError("list parameter must be a Set or a AudioRunner instance");Object.defineProperties(this,{trackIds:{value:new Set(list instanceof AudioRunner?list.trackIds:list)}})}return _createClass(AudioRunner,[{key:"load",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.load)}},{key:"unload",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.unload)}},{key:"play",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.play)}},{key:"playWhenAllowed",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.playWhenAllowed)}},{key:"pause",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.pause)}},{key:"stop",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.stop)}},{key:"fade",value:function(duration,toVol,fromVol){if(null==duration||null==toVol)throw new Error("fade requires parameters");AudioRunner._run(this.trackIds,AudioTrack.prototype.fade,duration,toVol,fromVol)}},{key:"fadeIn",value:function(duration,fromVol){if(null==duration)throw new Error("fadeIn requires a parameter");AudioRunner._run(this.trackIds,AudioTrack.prototype.fadeIn,duration,fromVol)}},{key:"fadeOut",value:function(duration,fromVol){if(null==duration)throw new Error("fadeOut requires a parameter");AudioRunner._run(this.trackIds,AudioTrack.prototype.fadeOut,duration,fromVol)}},{key:"fadeStop",value:function(){AudioRunner._run(this.trackIds,AudioTrack.prototype.fadeStop)}},{key:"loop",value:function(_loop4){if(null==_loop4)throw new Error("loop requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.loop,_loop4),this}},{key:"mute",value:function(_mute3){if(null==_mute3)throw new Error("mute requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.mute,_mute3),this}},{key:"rate",value:function(_rate3){if(null==_rate3)throw new Error("rate requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.rate,_rate3),this}},{key:"time",value:function(_time2){if(null==_time2)throw new Error("time requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.time,_time2),this}},{key:"volume",value:function(_volume3){if(null==_volume3)throw new Error("volume requires a parameter");return AudioRunner._run(this.trackIds,AudioTrack.prototype.volume,_volume3),this}},{key:"on",value:function(){for(var _len8=arguments.length,args=new Array(_len8),_key8=0;_key8<_len8;_key8++)args[_key8]=arguments[_key8];return AudioRunner._run.apply(AudioRunner,[this.trackIds,AudioTrack.prototype.on].concat(args)),this}},{key:"one",value:function(){for(var _len9=arguments.length,args=new Array(_len9),_key9=0;_key9<_len9;_key9++)args[_key9]=arguments[_key9];return AudioRunner._run.apply(AudioRunner,[this.trackIds,AudioTrack.prototype.one].concat(args)),this}},{key:"off",value:function(){for(var _len10=arguments.length,args=new Array(_len10),_key10=0;_key10<_len10;_key10++)args[_key10]=arguments[_key10];return AudioRunner._run.apply(AudioRunner,[this.trackIds,AudioTrack.prototype.off].concat(args)),this}}],[{key:"_run",value:function(ids,fn){for(var _len11=arguments.length,args=new Array(_len11>2?_len11-2:0),_key11=2;_key11<_len11;_key11++)args[_key11-2]=arguments[_key11];ids.forEach((function(id){var track=_tracks.get(id);track&&fn.apply(track,args)}))}}])}();var _runnerParseSelector=function(){var notWsRe=/\S/g,parenRe=/[()]/g;function processNegation(str,startPos){var match;if(notWsRe.lastIndex=startPos,null===(match=notWsRe.exec(str))||"("!==match[0])throw new Error('invalid ":not()" syntax: missing parenthesis');parenRe.lastIndex=notWsRe.lastIndex;for(var start=notWsRe.lastIndex,result={str:"",nextMatch:-1},depth=1;null!==(match=parenRe.exec(str));)if("("===match[0]?++depth:--depth,depth<1){result.nextMatch=parenRe.lastIndex,result.str=str.slice(start,result.nextMatch-1);break}return result}return function parseSelector(idArg){for(var match,ids=[],idRe=/:?[^\s:()]+/g;null!==(match=idRe.exec(idArg));){var id=match[0];if(":not"===id){if(0===ids.length)throw new Error('invalid negation: no group ID preceded ":not()"');var parent=ids[ids.length-1];if(!parent.id.startsWith(":"))throw new Error('invalid negation of track "'.concat(parent.id,'": only groups may be negated with ":not()"'));var negation=processNegation(idArg,idRe.lastIndex);if(-1===negation.nextMatch)throw new Error('unknown error parsing ":not()"');idRe.lastIndex=negation.nextMatch,parent.not=parseSelector(negation.str)}else ids.push({id:id})}return ids}}();function masterMute(mute){if(null==mute)return _masterMute;publish("mute",_masterMute=!!mute)}function unsubscribe(id){_subscribers.delete(id)}function publish(mesg,data){_subscribers.forEach((function(fn){return fn(mesg,data)}))}function _newTrack(sources){return new AudioTrack(sources.map((function(source){if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);if(passage.tags.includes("Twine.audio"))return passage.text.trim()}var match=_formatSpecRe.exec(source);return null===match?source:{format:match[1],src:match[2]}})))}return Object.preventExtensions(Object.create(null,{tracks:{value:Object.preventExtensions(Object.create(null,{add:{value:function(){if(arguments.length<2){var errors=[];throw arguments.length<1&&errors.push("track ID"),arguments.length<2&&errors.push("sources"),new Error("no ".concat(errors.join(" or ")," specified"))}var id=String(arguments[0]).trim(),what='track ID "'.concat(id,'"');if(_badIdRe.test(id))throw new Error("invalid ".concat(what,": track IDs must not contain colons or whitespace"));var track,sources=Array.isArray(arguments[1])?Array.from(arguments[1]):Array.from(arguments).slice(1);try{track=_newTrack(sources)}catch(ex){throw new Error("".concat(what,": error during track initialization: ").concat(ex.message))}if(Config.debug&&!track.hasSource())throw new Error("".concat(what,": no supported audio sources found"));_tracks.has(id)&&_tracks.get(id)._destroy(),_tracks.set(id,track)}},delete:{value:function(id){return _tracks.has(id)&&_tracks.get(id)._destroy(),_tracks.delete(id)}},clear:{value:function(){_tracks.forEach((function(track){return track._destroy()})),_tracks.clear()}},has:{value:function(id){return _tracks.has(id)}},get:{value:function(id){return _tracks.get(id)||null}}}))},groups:{value:Object.preventExtensions(Object.create(null,{add:{value:function(){if(arguments.length<2){var errors=[];throw arguments.length<1&&errors.push("group ID"),arguments.length<2&&errors.push("track IDs"),new Error("no ".concat(errors.join(" or ")," specified"))}var id=String(arguments[0]).trim(),what='group ID "'.concat(id,'"');if(!id.startsWith(":")||_badIdRe.test(id.slice(1)))throw new Error("invalid ".concat(what,": group IDs must start with a colon and must not contain colons or whitespace"));if(_specialIds.includes(id))throw new Error("cannot clobber special ".concat(what));var group,trackIds=Array.isArray(arguments[1])?Array.from(arguments[1]):Array.from(arguments).slice(1);try{group=new Set(trackIds.map((function(trackId){if(!_tracks.has(trackId))throw new Error('track "'.concat(trackId,'" does not exist'));return trackId})))}catch(ex){throw new Error("".concat(what,": error during group initialization: ").concat(ex.message))}_groups.set(id,Object.freeze(Array.from(group)))}},delete:{value:function(id){return _groups.delete(id)}},clear:{value:function(){_groups.clear()}},has:{value:function(id){return _groups.has(id)}},get:{value:function(id){return _groups.get(id)||null}}}))},lists:{value:Object.preventExtensions(Object.create(null,{add:{value:function(){if(arguments.length<2){var errors=[];throw arguments.length<1&&errors.push("list ID"),arguments.length<2&&errors.push("track IDs"),new Error("no ".concat(errors.join(" or ")," specified"))}var id=String(arguments[0]).trim(),what='list ID "'.concat(id,'"');if(_badIdRe.test(id))return this.error("invalid ".concat(what,": list IDs must not contain colons or whitespace"));var list,descriptors=Array.isArray(arguments[1])?Array.from(arguments[1]):Array.from(arguments).slice(1);try{list=new AudioList(descriptors.map((function(desc){if(null===desc)throw new Error("track descriptor must be a string or object (type: null)");switch(_typeof(desc)){case"string":desc={id:desc};break;case"object":if(!Object.hasOwn(desc,"id")&&!Object.hasOwn(desc,"sources"))throw new Error('track descriptor must contain one of either an "id" or a "sources" property');if(Object.hasOwn(desc,"id")&&Object.hasOwn(desc,"sources"))throw new Error('track descriptor must contain either an "id" or a "sources" property, not both');break;default:throw new Error("track descriptor must be a string or object (type: ".concat(_typeof(desc),")"))}var own,track,volume;if(Object.hasOwn(desc,"id")){if("string"!=typeof desc.id)throw new Error('"id" property must be a string');if(!_tracks.has(desc.id))throw new Error('track "'.concat(desc.id,'" does not exist'));track=_tracks.get(desc.id)}else if(Object.hasOwn(desc,"sources")){if(!Array.isArray(desc.sources)||0===desc.sources.length)throw new Error('"sources" property must be a non-empty array');if(Object.hasOwn(desc,"own"))throw new Error('"own" property is not allowed with the "sources" property');try{track=_newTrack(desc.sources),own=!0}catch(ex){throw new Error("error during track initialization: ".concat(ex.message))}if(Config.debug&&!track.hasSource())throw new Error("no supported audio sources found")}if(Object.hasOwn(desc,"own")){if("boolean"!=typeof desc.own)throw new Error('"own" property must be a boolean');(own=desc.own)&&(track=track.clone())}if(Object.hasOwn(desc,"volume")){if("number"!=typeof desc.volume||Number.isNaN(desc.volume)||!Number.isFinite(desc.volume)||desc.volume<0)throw new Error('"volume" property must be a non-negative finite number');volume=desc.volume}return{own:null!=own&&own,track:track,volume:null!=volume?volume:track.volume()}})))}catch(ex){throw new Error("".concat(what,": error during playlist initialization: ").concat(ex.message))}_lists.has(id)&&_lists.get(id)._destroy(),_lists.set(id,list)}},delete:{value:function(id){return _lists.has(id)&&_lists.get(id)._destroy(),_lists.delete(id)}},clear:{value:function(){_lists.forEach((function(list){return list._destroy()})),_lists.clear()}},has:{value:function(id){return _lists.has(id)}},get:{value:function(id){return _lists.get(id)||null}}}))},select:{value:function(){if(0===arguments.length)throw new Error("no track selector specified");var selector=String(arguments[0]).trim(),trackIds=new Set;try{var renderIds=function renderIds(idObj){var ids,id=idObj.id;switch(id){case":all":ids=allIds;break;case":looped":ids=allIds.filter((function(id){return _tracks.get(id).loop()}));break;case":muted":ids=allIds.filter((function(id){return _tracks.get(id).mute()}));break;case":paused":ids=allIds.filter((function(id){return _tracks.get(id).isPaused()}));break;case":playing":ids=allIds.filter((function(id){return _tracks.get(id).isPlaying()}));break;case":stopped":ids=allIds.filter((function(id){return _tracks.get(id).isStopped()}));break;default:if(id.startsWith(":")){var group=_groups.get(id);if(!group)throw new Error('group "'.concat(id,'" does not exist'));ids=group}else ids=[id]}if(Object.hasOwn(idObj,"not")){var negated=idObj.not.map((function(idObj){return renderIds(idObj)})).flat(1/0);ids=ids.filter((function(id){return!negated.includes(id)}))}return ids},allIds=Array.from(_tracks.keys());_runnerParseSelector(selector).forEach((function(idObj){return renderIds(idObj).forEach((function(id){if(!_tracks.has(id))throw new Error('track "'.concat(id,'" does not exist'));trackIds.add(id)}))}))}catch(ex){throw new Error("error during runner initialization: ".concat(ex.message))}return new AudioRunner(trackIds)}},load:{value:function(){publish("load")}},loadWithScreen:{value:function(){publish("loadwithscreen")}},mute:{value:masterMute},muteOnHidden:{value:function(mute){if(!Visibility.isEnabled())return!1;if(null==mute)return _masterMuteOnHidden;var namespace=".SimpleAudio_masterMuteOnHidden";if(_masterMuteOnHidden=!!mute){var visibilityChange="".concat(Visibility.changeEvent).concat(namespace);jQuery(document).off(namespace).on(visibilityChange,(function(){return masterMute(Visibility.isHidden())})),Visibility.isHidden()&&masterMute(!0)}else jQuery(document).off(namespace)}},rate:{value:function(rate){if(null==rate)return _masterRate;if("number"!=typeof rate||Number.isNaN(rate)||!Number.isFinite(rate))throw new Error("rate must be a finite number");publish("rate",_masterRate=Math.clamp(rate,.2,5))}},stop:{value:function(){publish("stop")}},unload:{value:function(){publish("unload")}},volume:{value:function(volume){if(null==volume)return _masterVolume;if("number"!=typeof volume||Number.isNaN(volume)||!Number.isFinite(volume))throw new Error("volume must be a finite number");publish("volume",_masterVolume=Math.clamp(volume,0,1))}}}))}(),State=function(){var _history=[],_active=momentCreate(),_activeIndex=-1,_expired=[],_prng=null,_temporary=Object.create(null);function stateMarshal(noDelta){var state={index:_activeIndex};return noDelta?state.history=clone(_history):state.delta=historyDeltaEncode(_history),_expired.length>0&&(state.expired=Array.from(_expired)),null!==_prng&&(state.seed=_prng.seed),state}function stateUnmarshal(state,noDelta){if(null==state)throw new Error("state object is null or undefined");if(!Object.hasOwn(state,noDelta?"history":"delta")||0===state[noDelta?"history":"delta"].length)throw new Error("state object has no history or history is empty");if(!Object.hasOwn(state,"index"))throw new Error("state object has no index");if(null!==_prng&&!Object.hasOwn(state,"seed"))throw new Error("state object has no seed, but PRNG is enabled");if(null===_prng&&Object.hasOwn(state,"seed"))throw new Error("state object has seed, but PRNG is disabled");_history=noDelta?clone(state.history):historyDeltaDecode(state.delta),_activeIndex=state.index,_expired=Object.hasOwn(state,"expired")?Array.from(state.expired):[],Object.hasOwn(state,"seed")&&(_prng.seed=state.seed),momentActivate(_activeIndex)}function momentCreate(title,variables){return{title:null==title?"":String(title),variables:null==variables?{}:clone(variables)}}function momentActivate(moment){if(null==moment)throw new Error("moment activation attempted with null or undefined");switch(_typeof(moment)){case"object":_active=clone(moment);break;case"number":if(historyIsEmpty())throw new Error("moment activation attempted with index on empty history");if(moment<0||moment>=historySize())throw new RangeError("moment activation attempted with out-of-bounds index; need [0, ".concat(historySize()-1,"], got ").concat(moment));_active=clone(_history[moment]);break;default:throw new TypeError('moment activation attempted with a "'.concat(_typeof(moment),'"; must be an object or valid history stack index'))}return null!==_prng&&(_prng=function(state){for(var prng=prngCreate(state.seed),i=state.pull;i>0;--i)prng.random();return prng}({seed:_prng.seed,pull:_active.pull})),session.set("state",stateMarshal()),triggerEvent(":historyupdate"),_active}function historyLength(){return _activeIndex+1}function historySize(){return _history.length}function historyIsEmpty(){return 0===_history.length}function historyTop(){return _history.length>0?_history[_history.length-1]:null}function historyGoTo(index){return!(null==index||index<0||index>=historySize()||index===_activeIndex)&&(momentActivate(_activeIndex=index),!0)}function historyDeltaEncode(historyArr){if(!Array.isArray(historyArr))return null;if(0===historyArr.length)return[];for(var delta=[historyArr[0]],i=1,iend=historyArr.length;i<iend;++i)delta.push(Diff.diff(historyArr[i-1],historyArr[i]));return delta}function historyDeltaDecode(delta){if(!Array.isArray(delta))return null;if(0===delta.length)return[];for(var historyArr=[clone(delta[0])],i=1,iend=delta.length;i<iend;++i)historyArr.push(Diff.patch(historyArr[i-1],delta[i]));return historyArr}function prngCreate(seedBase,mixEntropy){return new Math.seedrandom(seedBase,{entropy:Boolean(mixEntropy),pass:function(prng,seed){return Object.create(null,{prng:{value:prng},seed:{writable:!0,value:seed},pull:{writable:!0,value:0},random:{value:function(){return++this.pull,this.prng()}}})}})}function tempVariablesClear(){_temporary=Object.create(null)}var _METADATA_STORE="metadata";function metadataDelete(key){if("string"!=typeof key)throw new TypeError("State.metadata.delete key parameter must be a string (received: ".concat(_typeof(key),")"));var store=storage.get(_METADATA_STORE);store&&Object.hasOwn(store,key)&&(1===Object.keys(store).length?storage.delete(_METADATA_STORE):(delete store[key],storage.set(_METADATA_STORE,store)))}return Object.preventExtensions(Object.create(null,{reset:{value:function(){session.delete("state"),_history=[],_active=momentCreate(),_activeIndex=-1,_expired=[],_prng=null===_prng?null:prngCreate(_prng.seed),tempVariablesClear()}},restore:{value:function(){var state=session.get("state");return null!=state&&(stateUnmarshal(state),!0)}},marshalForSave:{value:function(){return stateMarshal(!0)}},unmarshalForSave:{value:function(state){return stateUnmarshal(state,!0)}},expired:{get:function(){return _expired}},turns:{get:function(){return _expired.length+historyLength()}},passages:{get:function(){return _expired.concat(_history.slice(0,historyLength()).map((function(moment){return moment.title})))}},hasPlayed:{value:function(title){return null!=title&&""!==title&&(!!_expired.includes(title)||!!_history.slice(0,historyLength()).some((function(moment){return moment.title===title})))}},active:{get:function(){return _active}},activeIndex:{get:function(){return _activeIndex}},passage:{get:function(){return _active.title}},variables:{get:function(){return _active.variables}},history:{get:function(){return _history}},length:{get:historyLength},size:{get:historySize},isEmpty:{value:historyIsEmpty},current:{get:function(){return _history.length>0?_history[_activeIndex]:null}},top:{get:historyTop},bottom:{get:function(){return _history.length>0?_history[0]:null}},index:{value:function(index){return historyIsEmpty()||index<0||index>_activeIndex?null:_history[index]}},peek:{value:function(offset){if(historyIsEmpty())return null;var lengthOffset=1+(offset?Math.abs(offset):0);return lengthOffset>historyLength()?null:_history[historyLength()-lengthOffset]}},has:{value:function(title){if(historyIsEmpty()||null==title||""===title)return!1;for(var i=_activeIndex;i>=0;--i)if(_history[i].title===title)return!0;return!1}},create:{value:function(title){for(0,historyLength()<historySize()&&_history.splice(historyLength(),historySize()-historyLength()),_history.push(momentCreate(title,_active.variables)),_prng&&(historyTop().pull=_prng.pull);historySize()>Config.history.maxStates;)_expired.push(_history.shift().title);return momentActivate(_activeIndex=historySize()-1),historyLength()}},goTo:{value:historyGoTo},go:{value:function(offset){return null!=offset&&0!==offset&&historyGoTo(_activeIndex+offset)}},deltaEncode:{value:historyDeltaEncode},deltaDecode:{value:historyDeltaDecode},prng:{value:Object.preventExtensions(Object.create(null,{init:{value:function(seedBase,mixEntropy){var what;if(!historyIsEmpty())throw what="the story JavaScript section",new Error("State.prng.init must be called during initialization, within either ".concat(what," or the StoryInit special passage"));_prng=prngCreate(seedBase,Boolean(mixEntropy)),_active.pull=_prng.pull}},isEnabled:{value:function(){return null!==_prng}},pull:{get:function(){return null!==_prng?_prng.pull:NaN}},seed:{get:function(){return null!==_prng?_prng.seed:null}}}))},random:{value:function(){return null!==_prng?_prng.random():Math.random()}},clearTemporary:{value:tempVariablesClear},temporary:{get:function(){return _temporary}},getVar:{value:function(varExpression){try{return Scripting.evalTwineScript(varExpression)}catch(ex){}}},setVar:{value:function(varExpression,value){try{return Scripting.evalTwineScript("".concat(varExpression," = SCRIPT$DATA$"),null,value),!0}catch(ex){}return!1}},metadata:{value:Object.preventExtensions(Object.create(null,{clear:{value:function(){storage.delete(_METADATA_STORE)}},delete:{value:metadataDelete},entries:{value:function(){var store=storage.get(_METADATA_STORE);return store&&Object.entries(store)}},get:{value:function(key){if("string"!=typeof key)throw new TypeError("State.metadata.get key parameter must be a string (received: ".concat(_typeof(key),")"));var store=storage.get(_METADATA_STORE);return store&&Object.hasOwn(store,key)?store[key]:undefined}},has:{value:function(key){if("string"!=typeof key)throw new TypeError("State.metadata.has key parameter must be a string (received: ".concat(_typeof(key),")"));var store=storage.get(_METADATA_STORE);return store&&Object.hasOwn(store,key)}},keys:{value:function(){var store=storage.get(_METADATA_STORE);return store&&Object.keys(store)}},set:{value:function(key,value){if("string"!=typeof key)throw new TypeError("State.metadata.set key parameter must be a string (received: ".concat(_typeof(key),")"));if(void 0===value)metadataDelete(key);else{var store=storage.get(_METADATA_STORE)||{};store[key]=value,storage.set(_METADATA_STORE,store)}}},size:{get:function(){var store=storage.get(_METADATA_STORE);return store?Object.keys(store).length:0}}}))}}))}(),Scripting=function(){function toStringOrDefault(value){return console.warn("[DEPRECATED] toStringOrDefault() is deprecated."),stringFrom(value)}function either(){if(0!==arguments.length)return Array.prototype.concat.apply([],arguments).random()}function forget(key){if("string"!=typeof key)throw new TypeError("forget key parameter must be a string (received: ".concat(getTypeOf(key),")"));State.metadata.delete(key)}function hasVisited(){if(0===arguments.length)throw new Error("hasVisited called with insufficient parameters");if(State.isEmpty())return!1;for(var needles=Array.prototype.concat.apply([],arguments),played=State.passages,i=0;i<needles.length;++i)if(!played.includes(needles[i]))return!1;return!0}function lastVisited(){if(0===arguments.length)throw new Error("lastVisited called with insufficient parameters");if(State.isEmpty())return-1;for(var needles=Array.prototype.concat.apply([],arguments),played=State.passages,uBound=played.length-1,turns=State.turns,i=0;i<needles.length&&turns>-1;++i){var lastIndex=played.lastIndexOf(needles[i]);turns=Math.min(turns,-1===lastIndex?-1:uBound-lastIndex)}return turns}function memorize(key,value){if("string"!=typeof key)throw new TypeError("memorize key parameter must be a string (received: ".concat(getTypeOf(key),")"));State.metadata.set(key,value)}function passage(){return State.passage}function previous(){var passages=State.passages;if(arguments.length>0){var offset=Number(arguments[0]);if(!Number.isSafeInteger(offset)||offset<1)throw new RangeError("previous offset parameter must be a positive integer greater than zero");return passages.length>offset?passages[passages.length-1-offset]:""}for(var i=passages.length-2;i>=0;--i)if(passages[i]!==State.passage)return passages[i];return""}function random(){var min,max;switch(arguments.length){case 0:throw new Error("random called with insufficient parameters");case 1:min=0,max=Math.trunc(arguments[0]);break;default:min=Math.trunc(arguments[0]),max=Math.trunc(arguments[1])}if(!Number.isInteger(min))throw new TypeError("random min parameter must be an integer");if(!Number.isInteger(max))throw new TypeError("random max parameter must be an integer");if(min>max){var _ref7=[max,min];min=_ref7[0],max=_ref7[1]}return Math.floor(State.random()*(max-min+1))+min}function randomFloat(){var min,max;switch(arguments.length){case 0:throw new Error("randomFloat called with insufficient parameters");case 1:min=0,max=Number(arguments[0]);break;default:min=Number(arguments[0]),max=Number(arguments[1])}if(Number.isNaN(min)||!Number.isFinite(min))throw new TypeError("randomFloat min parameter must be a number");if(Number.isNaN(max)||!Number.isFinite(max))throw new TypeError("randomFloat max parameter must be a number");if(min>max){var _ref8=[max,min];min=_ref8[0],max=_ref8[1]}return State.random()*(max-min)+min}function recall(key,defaultValue){if("string"!=typeof key)throw new TypeError("recall key parameter must be a string (received: ".concat(getTypeOf(key),")"));return State.metadata.has(key)?State.metadata.get(key):defaultValue}function tags(){if(0===arguments.length)return Story.get(State.passage).tags;for(var passages=Array.prototype.concat.apply([],arguments),tags=[],i=0;i<passages.length;++i)tags=tags.concat(Story.get(passages[i]).tags);return tags}function temporary(){return State.temporary}function time(){return null===Engine.lastPlay?0:now()-Engine.lastPlay}function turns(){return State.turns}function variables(){return State.variables}function visited(){if(State.isEmpty())return 0;for(var needles=Array.prototype.concat.apply([],0===arguments.length?[State.passage]:arguments),played=State.passages,count=State.turns,i=0;i<needles.length&&count>0;++i)count=Math.min(count,played.count(needles[i]));return count}function visitedTags(){if(0===arguments.length)throw new Error("visitedTags called with insufficient parameters");if(State.isEmpty())return 0;for(var needles=Array.prototype.concat.apply([],arguments),nLength=needles.length,played=State.passages,seen=new Map,count=0,i=0;i<played.length;++i){var title=played[i];if(seen.has(title))seen.get(title)&&++count;else{var _tags2=Story.get(title).tags;if(_tags2.length>0){for(var found=0,j=0;j<nLength;++j)_tags2.includes(needles[j])&&++found;found===nLength?(++count,seen.set(title,!0)):seen.set(title,!1)}}}return count}var _ref9=function(){function slugifyUrl(url){return parseURL(url).path.replace(/^[^\w]+|[^\w]+$/g,"").replace(/[^\w]+/g,"-").toLocaleLowerCase()}function addScript(url){return new Promise((function(resolve,reject){var kind,src;if("string"==typeof url)kind=url.trim().toLowerCase().endsWith(".mjs")?"module":"text/javascript",src=url;else{if("object"!==_typeof(url))throw new Error("importScripts url parameter must be a string or object");kind=url.type,src=url.src}jQuery(document.createElement("script")).one("load abort error",(function(ev){jQuery(ev.target).off(),"load"===ev.type?resolve(ev.target):reject(new Error('importScripts failed to load the script "'.concat(src,'"')))})).appendTo(document.head).attr({id:"script-imported-".concat(slugifyUrl(src)),type:kind,src:src})}))}function addStyle(url){return new Promise((function(resolve,reject){if("string"!=typeof url)throw new Error("importStyles url parameter must be a string");jQuery(document.createElement("link")).one("load abort error",(function(ev){jQuery(ev.target).off(),"load"===ev.type?resolve(ev.target):reject(new Error('importStyles failed to load the stylesheet "'.concat(url,'"')))})).appendTo(document.head).attr({id:"style-imported-".concat(slugifyUrl(url)),rel:"stylesheet",href:url})}))}function sequence(callbacks){return callbacks.reduce((function(seq,fn){return seq.then(fn)}),Promise.resolve())}return{importScripts:function(){for(var _len12=arguments.length,urls=new Array(_len12),_key12=0;_key12<_len12;_key12++)urls[_key12]=arguments[_key12];return Promise.all(urls.map((function(oneOrSeries){return Array.isArray(oneOrSeries)?sequence(oneOrSeries.map((function(url){return function(){return addScript(url)}}))):addScript(oneOrSeries)})))},importStyles:function(){for(var _len13=arguments.length,urls=new Array(_len13),_key13=0;_key13<_len13;_key13++)urls[_key13]=arguments[_key13];return Promise.all(urls.map((function(oneOrSeries){return Array.isArray(oneOrSeries)?sequence(oneOrSeries.map((function(url){return function(){return addStyle(url)}}))):addStyle(oneOrSeries)})))}}}(),importScripts=_ref9.importScripts,importStyles=_ref9.importStyles,desugar=function(){var tokenTable=enumFrom({$:"State.variables.",_:"State.temporary.",to:"=",eq:"==",neq:"!=",is:"===",isnot:"!==",gt:">",gte:">=",lt:"<",lte:"<=",and:"&&",or:"||",not:"!",def:'"undefined" !== typeof',ndef:'"undefined" === typeof'}),desugarRE=new RegExp(["(?:\"\"|''|``)",'(?:"(?:\\\\.|[^"\\\\])+")',"(?:'(?:\\\\.|[^'\\\\])+')","(`(?:\\\\.|[^`\\\\])+`)","(?:[=+\\-*\\/%<>&\\|\\^~!?:,;\\(\\)\\[\\]{}]+)","(?:\\.{3})","([^\"'=+\\-*\\/%<>&\\|\\^~!?:,;\\(\\)\\[\\]{}\\s]+)"].join("|"),"g"),varTest=new RegExp("^".concat(Patterns.variable));function desugar(sugaredCode){desugarRE.lastIndex=0;for(var match,code=sugaredCode;null!==(match=desugarRE.exec(code));)if(match[1]){var sugaredTemplate=match[1],template=desugarTemplate(sugaredTemplate);template!==sugaredTemplate&&(code=code.splice(match.index,sugaredTemplate.length,template),desugarRE.lastIndex+=template.length-sugaredTemplate.length)}else if(match[2]){var token=match[2];if("$"===token||"_"===token)continue;varTest.test(token)&&(token=token[0]),tokenTable[token]&&(code=code.splice(match.index,token.length,tokenTable[token]),desugarRE.lastIndex+=tokenTable[token].length-token.length)}return code}var templateGroupStartRE=/\$\{/g,templateGroupParseRE=new RegExp(["(?:\"\"|'')",'(?:"(?:\\\\.|[^"\\\\])+")',"(?:'(?:\\\\.|[^'\\\\])+')","(\\{)","(\\})"].join("|"),"g");function desugarTemplate(sugaredLiteral){templateGroupStartRE.lastIndex=0;for(var startMatch,template=sugaredLiteral;null!==(startMatch=templateGroupStartRE.exec(template));){var startIndex=startMatch.index+2,endIndex=startIndex,depth=1,endMatch=void 0;for(templateGroupParseRE.lastIndex=startIndex;null!==(endMatch=templateGroupParseRE.exec(template));)if(endMatch[1]?++depth:endMatch[2]&&--depth,0===depth){endIndex=endMatch.index;break}if(endIndex>startIndex){var desugarREIndex=desugarRE.lastIndex,sugaredGroup=template.slice(startIndex,endIndex),group=desugar(sugaredGroup);desugarRE.lastIndex=desugarREIndex,template=template.splice(startIndex,sugaredGroup.length,group),templateGroupStartRE.lastIndex+=group.length-sugaredGroup.length}}return template}return desugar}();function evalJavaScript(code,output,data){return function(code,output,SCRIPT$DATA$){return eval(code)}.call(output?{output:output}:null,String(code),output,data)}function evalTwineScript(code,output,data){return function(code,output,SCRIPT$DATA$){return eval(code)}.call(output?{output:output}:null,desugar(String(code)),output,data)}return Object.preventExtensions(Object.create(null,{desugar:{value:desugar},evalJavaScript:{value:evalJavaScript},evalTwineScript:{value:evalTwineScript},parse:{value:desugar}}))}(),_ref10=function(){var Lexer=function(){return _createClass((function Lexer(source,initialState){if(_classCallCheck(this,Lexer),arguments.length<2)throw new Error("Lexer constructor called with too few parameters (source:string , initialState:function)");Object.defineProperties(this,{source:{value:source},initial:{value:initialState},state:{writable:!0,value:initialState},start:{writable:!0,value:0},pos:{writable:!0,value:0},depth:{writable:!0,value:0},items:{writable:!0,value:[]},data:{writable:!0,value:{}}})}),[{key:"reset",value:function(){this.state=this.initial,this.start=0,this.pos=0,this.depth=0,this.items=[],this.data={}}},{key:"run",value:function(){for(;null!==this.state;)this.state=this.state(this);return this.items}},{key:"nextItem",value:function(){for(;0===this.items.length&&null!==this.state;)this.state=this.state(this);return this.items.shift()}},{key:"next",value:function(){return this.pos>=this.source.length?-1:this.source[this.pos++]}},{key:"peek",value:function(){return this.pos>=this.source.length?-1:this.source[this.pos]}},{key:"backup",value:function(num){this.pos-=num||1}},{key:"forward",value:function(num){this.pos+=num||1}},{key:"ignore",value:function(){this.start=this.pos}},{key:"accept",value:function(valid){var ch=this.next();return-1!==ch&&(!!valid.includes(ch)||(this.backup(),!1))}},{key:"acceptRe",value:function(validRe){var ch=this.next();return-1!==ch&&(!!validRe.test(ch)||(this.backup(),!1))}},{key:"acceptRun",value:function(valid){for(;;){var ch=this.next();if(-1===ch)return;if(!valid.includes(ch))break}this.backup()}},{key:"acceptRunRe",value:function(validRe){for(;;){var ch=this.next();if(-1===ch)return;if(!validRe.test(ch))break}this.backup()}},{key:"emit",value:function(type){this.items.push({type:type,text:this.source.slice(this.start,this.pos),start:this.start,pos:this.pos}),this.start=this.pos}},{key:"error",value:function(type,message){if(arguments.length<2)throw new Error("Lexer.prototype.error called with too few parameters (type:number , message:string)");return this.items.push({type:type,message:message,text:this.source.slice(this.start,this.pos),start:this.start,pos:this.pos}),null}}],[{key:"enumFromNames",value:function(names){var obj=names.reduce((function(obj,name,i){return obj[name]=i,obj}),{});return Object.freeze(Object.assign(Object.create(null),obj))}}])}();return{EOF:-1,Lexer:Lexer}}(),EOF=_ref10.EOF,Lexer=_ref10.Lexer,Wikifier=function(){var _optionsStack,macroParser,lookaheadRe,idOrClassRe,_callDepth=0,Wikifier=function(){function Wikifier(destination,source,options){_classCallCheck(this,Wikifier),Wikifier.Parser.Profile.isEmpty()&&Wikifier.Parser.Profile.compile(),Object.defineProperties(this,{source:{value:String(source)},options:{writable:!0,value:Object.assign({profile:"all"},options)},nextMatch:{writable:!0,value:0},output:{writable:!0,value:null},_rawArgs:{writable:!0,value:""}}),this.output=null==destination?document.createDocumentFragment():destination instanceof jQuery?destination[0]:destination;try{++_callDepth,this.subWikify(this.output),1===_callDepth&&(Object.hasOwn(this.options,"cleanup")&&null!=this.options.cleanup?this.options.cleanup:Config.cleanupWikifierOutput)&&convertBreaks(this.output)}finally{--_callDepth}}return _createClass(Wikifier,[{key:"subWikify",value:function(output,terminator,options){var newOptions,oldOptions,oldOutput=this.output;this.output=output,Wikifier.Option.length>0&&(newOptions=Object.assign(newOptions||{},Wikifier.Option.options)),null!==options&&"object"===_typeof(options)&&(newOptions=Object.assign(newOptions||{},options)),newOptions&&(oldOptions=this.options,this.options=Object.assign({},this.options,newOptions));var terminatorMatch,parserMatch,parsersProfile=Wikifier.Parser.Profile.get(this.options.profile),terminatorRegExp=terminator?new RegExp("(?:".concat(terminator,")"),this.options.ignoreTerminatorCase?"gim":"gm"):null;do{if(parsersProfile.parserRegExp.lastIndex=this.nextMatch,terminatorRegExp&&(terminatorRegExp.lastIndex=this.nextMatch),parserMatch=parsersProfile.parserRegExp.exec(this.source),(terminatorMatch=terminatorRegExp?terminatorRegExp.exec(this.source):null)&&(!parserMatch||terminatorMatch.index<=parserMatch.index))return terminatorMatch.index>this.nextMatch&&this.outputText(this.output,this.nextMatch,terminatorMatch.index),this.matchStart=terminatorMatch.index,this.matchLength=terminatorMatch[0].length,this.matchText=terminatorMatch[0],this.nextMatch=terminatorRegExp.lastIndex,this.output=oldOutput,void(oldOptions&&(this.options=oldOptions));if(parserMatch){parserMatch.index>this.nextMatch&&this.outputText(this.output,this.nextMatch,parserMatch.index),this.matchStart=parserMatch.index,this.matchLength=parserMatch[0].length,this.matchText=parserMatch[0],this.nextMatch=parsersProfile.parserRegExp.lastIndex;for(var matchingParser=void 0,i=1,iend=parserMatch.length;i<iend;++i)if(parserMatch[i]){matchingParser=i-1;break}if(parsersProfile.parsers[matchingParser].handler(this),null!=TempState.break)break}}while(terminatorMatch||parserMatch);null==TempState.break?this.nextMatch<this.source.length&&(this.outputText(this.output,this.nextMatch,this.source.length),this.nextMatch=this.source.length):this.output.lastChild&&this.output.lastChild.nodeType===Node.ELEMENT_NODE&&"BR"===this.output.lastChild.nodeName.toUpperCase()&&jQuery(this.output.lastChild).remove(),this.output=oldOutput,oldOptions&&(this.options=oldOptions)}},{key:"outputText",value:function(destination,startPos,endPos){jQuery(destination).append(document.createTextNode(this.source.substring(startPos,endPos)))}},{key:"rawArgs",value:function(){return console.warn("[DEPRECATED] Wikifier.rawArgs() is deprecated."),this._rawArgs}},{key:"fullArgs",value:function(){return console.warn("[DEPRECATED] Wikifier.fullArgs() is deprecated."),Scripting.desugar(this._rawArgs)}}],[{key:"wikifyEval",value:function(text){var output=document.createDocumentFragment();new Wikifier(output,text);var errors=output.querySelector(".error");if(null!==errors)throw new Error(errors.textContent.replace(errorPrologRegExp,""));return output}},{key:"createInternalLink",value:function(destination,passage,text,callback){var $link=jQuery(document.createElement("a"));return null!=passage&&($link.attr("data-passage",passage),Story.has(passage)?($link.addClass("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&$link.addClass("link-visited")):$link.addClass("link-broken"),$link.ariaClick({one:!0},(function(){"function"==typeof callback&&callback(),Engine.play(passage)}))),text&&$link.append(document.createTextNode(text)),destination&&$link.appendTo(destination),$link[0]}},{key:"createExternalLink",value:function(destination,url,text){var $link=jQuery(document.createElement("a")).attr("target","_blank").addClass("link-external").text(text).appendTo(destination);return null!=url&&$link.attr({href:url,tabindex:0}),$link[0]}}])}();return Object.defineProperty(Wikifier,"Option",{value:(_optionsStack=[],Object.preventExtensions(Object.create(null,{length:{get:function(){return _optionsStack.length}},options:{get:function(){return Object.assign.apply(Object,[{}].concat(_toConsumableArray(_optionsStack)))}},clear:{value:function(){_optionsStack=[]}},get:{value:function(index){return _optionsStack[index]}},pop:{value:function(){return _optionsStack.pop()}},push:{value:function(options){if("object"!==_typeof(options)||null===options)throw new TypeError("Wikifier.Option.push options parameter must be an object (received: ".concat(getTypeOf(options),")"));return _optionsStack.push(options)}}})))}),Object.defineProperty(Wikifier,"Parser",{value:function(){var _profiles,_parsers=[];function parsersHas(name){return!!_parsers.find((function(parser){return parser.name===name}))}return Object.preventExtensions(Object.create(null,{parsers:{get:function(){return _parsers}},add:{value:function(parser){if("object"!==_typeof(parser))throw new Error("Wikifier.Parser.add parser parameter must be an object");if(!Object.hasOwn(parser,"name"))throw new Error('parser object missing required "name" property');if("string"!=typeof parser.name)throw new Error('parser object "name" property must be a string');if(!Object.hasOwn(parser,"match"))throw new Error('parser object missing required "match" property');if("string"!=typeof parser.match)throw new Error('parser object "match" property must be a string');if(!Object.hasOwn(parser,"handler"))throw new Error('parser object missing required "handler" property');if("function"!=typeof parser.handler)throw new Error('parser object "handler" property must be a function');if(Object.hasOwn(parser,"profiles")&&!Array.isArray(parser.profiles))throw new Error('parser object "profiles" property must be an array');if(parsersHas(parser.name))throw new Error('cannot clobber existing parser "'.concat(parser.name,'"'));_parsers.push(parser)}},delete:{value:function(name){var parser=_parsers.find((function(parser){return parser.name===name}));parser&&_parsers.delete(parser)}},isEmpty:{value:function(){return 0===_parsers.length}},has:{value:parsersHas},get:{value:function(name){return _parsers.find((function(parser){return parser.name===name}))||null}},Profile:{value:Object.preventExtensions(Object.create(null,{profiles:{get:function(){return _profiles}},compile:{value:function(){var all=_parsers,core=all.filter((function(parser){return!Array.isArray(parser.profiles)||parser.profiles.includes("core")}));return _profiles=Object.freeze({all:{parsers:all,parserRegExp:new RegExp(all.map((function(parser){return"(".concat(parser.match,")")})).join("|"),"gm")},core:{parsers:core,parserRegExp:new RegExp(core.map((function(parser){return"(".concat(parser.match,")")})).join("|"),"gm")}})}},isEmpty:{value:function(){return"object"!==_typeof(_profiles)||0===Object.keys(_profiles).length}},has:{value:function(profile){return"object"===_typeof(_profiles)&&Object.hasOwn(_profiles,profile)}},get:{value:function(profile){if("object"!==_typeof(_profiles)||!Object.hasOwn(_profiles,profile))throw new Error('nonexistent parser profile "'.concat(profile,'"'));return _profiles[profile]}}}))}}))}()}),Object.defineProperties(Wikifier,{helpers:{value:{}},isExternalLink:{value:isExternalLink},getValue:{value:State.getVar},setValue:{value:State.setVar},parse:{value:Scripting.desugar},evalExpression:{value:Scripting.evalTwineScript},evalStatements:{value:Scripting.evalTwineScript},textPrimitives:{value:Patterns}}),Object.defineProperties(Wikifier.helpers,{inlineCss:{value:(lookaheadRe=new RegExp(Patterns.inlineCss,"gm"),idOrClassRe=new RegExp("(".concat(Patterns.cssIdOrClassSigil,")(").concat(Patterns.anyLetter,"+)"),"g"),function(w){var matched,css={classes:[],id:"",styles:{}};do{lookaheadRe.lastIndex=w.nextMatch;var match=lookaheadRe.exec(w.source);if(matched=match&&match.index===w.nextMatch){if(match[1])css.styles[cssPropToDOMProp(match[1])]=match[2].trim();else if(match[3])css.styles[cssPropToDOMProp(match[3])]=match[4].trim();else if(match[5]){var subMatch=void 0;for(idOrClassRe.lastIndex=0;null!==(subMatch=idOrClassRe.exec(match[5]));)"."===subMatch[1]?css.classes.push(subMatch[2]):css.id=subMatch[2]}w.nextMatch=lookaheadRe.lastIndex}}while(matched);return css})},evalText:{value:function(text){var result;try{switch(_typeof(result=Scripting.evalTwineScript(text))){case"string":""===result.trim()&&(result=text);break;case"number":result=String(result);break;default:result=text}}catch(ex){result=text}return result}},evalPassageId:{value:function(passage){return null==passage||Story.has(passage)?passage:Wikifier.helpers.evalText(passage)}},hasBlockContext:{value:function(nodes){for(var hasGCS="function"==typeof window.getComputedStyle,i=nodes.length-1;i>=0;--i){var node=nodes[i];switch(node.nodeType){case Node.ELEMENT_NODE:var tagName=node.nodeName.toUpperCase();if("BR"===tagName)return!0;var styles=hasGCS?window.getComputedStyle(node,null):node.currentStyle;if(styles&&styles.display){if("none"===styles.display)continue;return"block"===styles.display}switch(tagName){case"ADDRESS":case"ARTICLE":case"ASIDE":case"BLOCKQUOTE":case"CENTER":case"DIV":case"DL":case"FIGURE":case"FOOTER":case"FORM":case"H1":case"H2":case"H3":case"H4":case"H5":case"H6":case"HEADER":case"HR":case"MAIN":case"NAV":case"OL":case"P":case"PRE":case"SECTION":case"TABLE":case"UL":return!0}return!1;case Node.COMMENT_NODE:continue;default:return!1}}return!0}},shadowHandler:{value:(macroParser=null,function(code){var shadowStore=Object.create(null);return macroParser||function(){if(!macroParser&&!(macroParser=Wikifier.Parser.get("macro")))throw new Error('cannot find "macro" parser')}(),macroParser.context&&macroParser.context.shadowView.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey]})),function(){var shadowNames=Object.keys(shadowStore),valueCache=shadowNames.length>0?{}:null;try{return shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;Object.hasOwn(store,varKey)&&(valueCache[varKey]=store[varKey]),store[varKey]=shadowStore[varName]})),Scripting.evalJavaScript(code)}finally{shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey],Object.hasOwn(valueCache,varKey)?store[varKey]=valueCache[varKey]:delete store[varKey]}))}}})},parseSquareBracketedMarkup:{value:function(){var Item=Lexer.enumFromNames(["Error","DelimLTR","DelimRTL","InnerMeta","ImageMeta","LinkMeta","Link","RightMeta","Setter","Source","Text"]),Delim=Lexer.enumFromNames(["None","LTR","RTL"]);function slurpQuote(lexer,endQuote){loop:for(;;)switch(lexer.next()){case"\\":var ch=lexer.next();if(ch!==EOF&&"\n"!==ch)break;case EOF:case"\n":return EOF;case endQuote:break loop}return lexer.pos}function lexLeftMeta(lexer){if(!lexer.accept("["))return lexer.error(Item.Error,"malformed square-bracketed markup");if(lexer.accept("["))lexer.data.isLink=!0,lexer.emit(Item.LinkMeta);else{if(lexer.accept("<>"),!(lexer.accept("Ii")&&lexer.accept("Mm")&&lexer.accept("Gg")&&lexer.accept("[")))return lexer.error(Item.Error,"malformed square-bracketed markup");lexer.data.isLink=!1,lexer.emit(Item.ImageMeta)}return lexer.depth=2,lexCoreComponents}function lexCoreComponents(lexer){for(var what=lexer.data.isLink?"link":"image",delim=Delim.None;;)switch(lexer.next()){case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case'"':if(slurpQuote(lexer,'"')===EOF)return lexer.error(Item.Error,"unterminated double quoted string in ".concat(what," markup"));break;case"|":delim===Delim.None&&(delim=Delim.LTR,lexer.backup(),lexer.emit(Item.Text),lexer.forward(),lexer.emit(Item.DelimLTR));break;case"-":delim===Delim.None&&">"===lexer.peek()&&(delim=Delim.LTR,lexer.backup(),lexer.emit(Item.Text),lexer.forward(2),lexer.emit(Item.DelimLTR));break;case"<":delim===Delim.None&&"-"===lexer.peek()&&(delim=Delim.RTL,lexer.backup(),lexer.emit(lexer.data.isLink?Item.Link:Item.Source),lexer.forward(2),lexer.emit(Item.DelimRTL));break;case"[":++lexer.depth;break;case"]":if(--lexer.depth,1===lexer.depth)switch(lexer.peek()){case"[":return++lexer.depth,lexer.backup(),delim===Delim.RTL?lexer.emit(Item.Text):lexer.emit(lexer.data.isLink?Item.Link:Item.Source),lexer.forward(2),lexer.emit(Item.InnerMeta),lexer.data.isLink?lexSetter:lexImageLink;case"]":return--lexer.depth,lexer.backup(),delim===Delim.RTL?lexer.emit(Item.Text):lexer.emit(lexer.data.isLink?Item.Link:Item.Source),lexer.forward(2),lexer.emit(Item.RightMeta),null;default:return lexer.error(Item.Error,"malformed ".concat(what," markup"))}}}function lexImageLink(lexer){for(var what=lexer.data.isLink?"link":"image";;)switch(lexer.next()){case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case'"':if(slurpQuote(lexer,'"')===EOF)return lexer.error(Item.Error,"unterminated double quoted string in ".concat(what," markup link component"));break;case"[":++lexer.depth;break;case"]":if(--lexer.depth,1===lexer.depth)switch(lexer.peek()){case"[":return++lexer.depth,lexer.backup(),lexer.emit(Item.Link),lexer.forward(2),lexer.emit(Item.InnerMeta),lexSetter;case"]":return--lexer.depth,lexer.backup(),lexer.emit(Item.Link),lexer.forward(2),lexer.emit(Item.RightMeta),null;default:return lexer.error(Item.Error,"malformed ".concat(what," markup"))}}}function lexSetter(lexer){for(var what=lexer.data.isLink?"link":"image";;)switch(lexer.next()){case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case'"':if(slurpQuote(lexer,'"')===EOF)return lexer.error(Item.Error,"unterminated double quoted string in ".concat(what," markup setter component"));break;case"'":if(slurpQuote(lexer,"'")===EOF)return lexer.error(Item.Error,"unterminated single quoted string in ".concat(what," markup setter component"));break;case"[":++lexer.depth;break;case"]":if(--lexer.depth,1===lexer.depth)return"]"!==lexer.peek()?lexer.error(Item.Error,"malformed ".concat(what," markup")):(--lexer.depth,lexer.backup(),lexer.emit(Item.Setter),lexer.forward(2),lexer.emit(Item.RightMeta),null)}}return function(w){var lexer=new Lexer(w.source,lexLeftMeta);lexer.start=lexer.pos=w.matchStart;var markup={},items=lexer.run(),last=items.last();return last&&last.type===Item.Error?markup.error=last.message:items.forEach((function(item){var text=item.text.trim();switch(item.type){case Item.ImageMeta:markup.isImage=!0,"<"===text[1]?markup.align="left":">"===text[1]&&(markup.align="right");break;case Item.LinkMeta:markup.isLink=!0;break;case Item.Link:"~"===text[0]?(markup.forceInternal=!0,markup.link=text.slice(1)):markup.link=text;break;case Item.Setter:markup.setter=text;break;case Item.Source:markup.source=text;break;case Item.Text:markup.text=text}})),markup.pos=lexer.pos,markup}}()}}),Wikifier}();!function(){function _verbatimTagHandler(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);match&&match.index===w.matchStart&&(w.nextMatch=this.lookahead.lastIndex,jQuery(document.createDocumentFragment()).append(match[1]).appendTo(w.output))}Wikifier.Parser.add({name:"quoteByBlock",profiles:["block"],match:"^<<<\\n",terminator:"^<<<\\n",handler:function(w){Wikifier.helpers.hasBlockContext(w.output.childNodes)?w.subWikify(jQuery(document.createElement("blockquote")).appendTo(w.output).get(0),this.terminator):jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"quoteByLine",profiles:["block"],match:"^>+",lookahead:/^>+/gm,terminator:"\\n",handler:function(w){if(Wikifier.helpers.hasBlockContext(w.output.childNodes)){var matched,i,destStack=[w.output],curLevel=0,newLevel=w.matchLength;do{if(newLevel>curLevel)for(i=curLevel;i<newLevel;++i)destStack.push(jQuery(document.createElement("blockquote")).appendTo(destStack[destStack.length-1]).get(0));else if(newLevel<curLevel)for(i=curLevel;i>newLevel;--i)destStack.pop();curLevel=newLevel,w.subWikify(destStack[destStack.length-1],this.terminator),jQuery(document.createElement("br")).appendTo(destStack[destStack.length-1]),this.lookahead.lastIndex=w.nextMatch;var match=this.lookahead.exec(w.source);(matched=match&&match.index===w.nextMatch)&&(newLevel=match[0].length,w.nextMatch+=match[0].length)}while(matched)}else jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"macro",profiles:["core"],match:"<<",lookahead:new RegExp("<<(/?".concat(Patterns.macroName,")(?:\\s*)((?:(?:/\\*[^*]*\\*+(?:[^/*][^*]*\\*+)*/)|(?://.*\\n)|(?:`(?:\\\\.|[^`\\\\])*`)|(?:\"(?:\\\\.|[^\"\\\\])*\")|(?:'(?:\\\\.|[^'\\\\])*')|(?:\\[(?:[<>]?[Ii][Mm][Gg])?\\[[^\\r\\n]*?\\]\\]+)|[^>]|(?:>(?!>)))*)>>"),"gm"),working:{source:"",name:"",arguments:"",index:0},context:null,handler:function(w){var matchStart=this.lookahead.lastIndex=w.matchStart;if(this.parseTag(w)){var macro,nextMatch=w.nextMatch,name=this.working.name,rawArgs=this.working.arguments;try{if(!(macro=Macro.get(name))){if(Macro.tags.has(name)){var tags=Macro.tags.get(name);return appendError(w.output,"child tag <<".concat(name,">> was found outside of a call to its parent macro").concat(1===tags.length?"":"s"," <<").concat(tags.join(">>, <<"),">>"),w.source.slice(matchStart,w.nextMatch))}return appendError(w.output,"macro <<".concat(name,">> does not exist"),w.source.slice(matchStart,w.nextMatch))}var payload=null;if(void 0!==macro.tags&&!(payload=this.parseBody(w,macro)))return w.nextMatch=nextMatch,appendError(w.output,"cannot find a closing tag for macro <<".concat(name,">>"),"".concat(w.source.slice(matchStart,w.nextMatch),"…"));if("function"!=typeof macro.handler)return appendError(w.output,"macro <<".concat(name,">> handler function ").concat(void 0===macro.handler?"does not exist":"is not a function"),w.source.slice(matchStart,w.nextMatch));var args=payload?payload[0].args:this.createArgs(rawArgs,this.skipArgs(macro,macro.name));if(void 0!==macro._MACRO_API){this.context=new MacroContext({macro:macro,name:name,args:args,payload:payload,source:w.source.slice(matchStart,w.nextMatch),parent:this.context,parser:w});try{macro.handler.call(this.context)}finally{this.context=this.context.parent}}else{console.warn("[DEPRECATED] The legacy macro API, used by <<".concat(name,">>, is deprecated."));var prevRawArgs=w._rawArgs;w._rawArgs=rawArgs;try{macro.handler(w.output,name,args,w,payload)}finally{w._rawArgs=prevRawArgs}}}catch(ex){return appendError(w.output,"cannot execute ".concat(macro&&macro.isWidget?"widget":"macro"," <<").concat(name,">>: ").concat(ex.message),w.source.slice(matchStart,w.nextMatch))}finally{this.working.source="",this.working.name="",this.working.arguments="",this.working.index=0}}else w.outputText(w.output,w.matchStart,w.nextMatch)},parseTag:function(w){var match=this.lookahead.exec(w.source);return!(!match||match.index!==w.matchStart||!match[1])&&(w.nextMatch=this.lookahead.lastIndex,this.working.source=w.source.slice(match.index,this.lookahead.lastIndex),this.working.name=match[1],this.working.arguments=match[2],this.working.index=match.index,!0)},parseBody:function(w,macro){for(var openTag=this.working.name,closeTag="/".concat(openTag),closeAlt="end".concat(openTag),bodyTags=!!Array.isArray(macro.tags)&&macro.tags,payload=[],end=-1,opened=1,curSource=this.working.source,curTag=this.working.name,curArgument=this.working.arguments,contentStart=w.nextMatch;-1!==(w.matchStart=w.source.indexOf(this.match,w.nextMatch));)if(this.parseTag(w)){var tagSource=this.working.source,tagName=this.working.name,tagArgs=this.working.arguments,tagBegin=this.working.index,tagEnd=w.nextMatch,hasArgs=""!==tagArgs.trim();switch(tagName){case openTag:++opened;break;case closeAlt:case closeTag:if(hasArgs)throw w.nextMatch=tagBegin+2+tagName.length,new Error('malformed closing tag: "'.concat(tagSource,'"'));--opened;break;default:if(hasArgs&&(tagName.startsWith("/")||tagName.startsWith("end"))){this.lookahead.lastIndex=w.nextMatch=tagBegin+2+tagName.length;continue}if(1===opened&&bodyTags)for(var i=0,iend=bodyTags.length;i<iend;++i)tagName===bodyTags[i]&&(payload.push({source:curSource,name:curTag,arguments:curArgument,args:this.createArgs(curArgument,this.skipArgs(macro,curTag)),contents:w.source.slice(contentStart,tagBegin)}),curSource=tagSource,curTag=tagName,curArgument=tagArgs,contentStart=tagEnd)}if(0===opened){payload.push({source:curSource,name:curTag,arguments:curArgument,args:this.createArgs(curArgument,this.skipArgs(macro,curTag)),contents:w.source.slice(contentStart,tagBegin)}),end=tagEnd;break}}else this.lookahead.lastIndex=w.nextMatch=w.matchStart+this.match.length;return-1!==end?(w.nextMatch=end,payload):null},createArgs:function(rawArgsString,skipArgs){var args=skipArgs?[]:this.parseArgs(rawArgsString);return Object.defineProperties(args,{raw:{value:rawArgsString},full:{value:Scripting.desugar(rawArgsString)}}),args},skipArgs:function(macro,tagName){if(void 0!==macro.skipArgs){var sa=macro.skipArgs;return"boolean"==typeof sa&&sa||Array.isArray(sa)&&sa.includes(tagName)}return void 0!==macro.skipArg0&&(macro.skipArg0&&macro.name===tagName)},parseArgs:function(){var Item=Lexer.enumFromNames(["Error","Bareword","Expression","String","SquareBracket"]),spaceRe=new RegExp(Patterns.space),notSpaceRe=new RegExp(Patterns.notSpace),varTest=new RegExp("^".concat(Patterns.variable));function slurpQuote(lexer,endQuote){loop:for(;;)switch(lexer.next()){case"\\":var ch=lexer.next();if(ch!==EOF&&"\n"!==ch)break;case EOF:case"\n":return EOF;case endQuote:break loop}return lexer.pos}function lexSpace(lexer){var offset=lexer.source.slice(lexer.pos).search(notSpaceRe);if(offset===EOF)return null;switch(0!==offset&&(lexer.pos+=offset,lexer.ignore()),lexer.next()){case"`":return lexExpression;case'"':return lexDoubleQuote;case"'":return lexSingleQuote;case"[":return lexSquareBracket;default:return lexBareword}}function lexExpression(lexer){return slurpQuote(lexer,"`")===EOF?lexer.error(Item.Error,"unterminated backquote expression"):(lexer.emit(Item.Expression),lexSpace)}function lexDoubleQuote(lexer){return slurpQuote(lexer,'"')===EOF?lexer.error(Item.Error,"unterminated double quoted string"):(lexer.emit(Item.String),lexSpace)}function lexSingleQuote(lexer){return slurpQuote(lexer,"'")===EOF?lexer.error(Item.Error,"unterminated single quoted string"):(lexer.emit(Item.String),lexSpace)}function lexSquareBracket(lexer){var what;if(lexer.accept("<>IiMmGg")?(what="image",lexer.acceptRun("<>IiMmGg")):what="link",!lexer.accept("["))return lexer.error(Item.Error,"malformed ".concat(what," markup"));lexer.depth=2;loop:for(;;)switch(lexer.next()){case"\\":var ch=lexer.next();if(ch!==EOF&&"\n"!==ch)break;case EOF:case"\n":return lexer.error(Item.Error,"unterminated ".concat(what," markup"));case"[":++lexer.depth;break;case"]":if(--lexer.depth,lexer.depth<0)return lexer.error(Item.Error,"unexpected right square bracket ']'");if(1===lexer.depth){if("]"===lexer.next()){--lexer.depth;break loop}lexer.backup()}}return lexer.emit(Item.SquareBracket),lexSpace}function lexBareword(lexer){var offset=lexer.source.slice(lexer.pos).search(spaceRe);return lexer.pos=offset===EOF?lexer.source.length:lexer.pos+offset,lexer.emit(Item.Bareword),offset===EOF?null:lexSpace}return function(rawArgsString){var lexer=new Lexer(rawArgsString,lexSpace),args=[];return lexer.run().forEach((function(item){var arg=item.text;switch(item.type){case Item.Error:throw new Error('unable to parse macro argument "'.concat(arg,'": ').concat(item.message));case Item.Bareword:if(varTest.test(arg))arg=State.getVar(arg);else if(/^(?:settings|setup)[.[]/.test(arg))try{arg=Scripting.evalTwineScript(arg)}catch(ex){throw new Error('unable to parse macro argument "'.concat(arg,'": ').concat(ex.message))}else if("null"===arg)arg=null;else if("undefined"===arg)arg=undefined;else if("true"===arg)arg=!0;else if("false"===arg)arg=!1;else if("NaN"===arg)arg=NaN;else{var argAsNum=Number(arg);Number.isNaN(argAsNum)||(arg=argAsNum)}break;case Item.Expression:if(""===(arg=arg.slice(1,-1).trim()))arg=undefined;else try{arg=Scripting.evalTwineScript("(".concat(arg,")"))}catch(ex){throw new Error('unable to parse macro argument expression "'.concat(arg,'": ').concat(ex.message))}break;case Item.String:try{arg=Scripting.evalJavaScript(arg)}catch(ex){throw new Error('unable to parse macro argument string "'.concat(arg,'": ').concat(ex.message))}break;case Item.SquareBracket:var markup=Wikifier.helpers.parseSquareBracketedMarkup({source:arg,matchStart:0});if(Object.hasOwn(markup,"error"))throw new Error('unable to parse macro argument "'.concat(arg,'": ').concat(markup.error));if(markup.pos<arg.length)throw new Error('unable to parse macro argument "'.concat(arg,'": unexpected character(s) "').concat(arg.slice(markup.pos),'" (pos: ').concat(markup.pos,")"));markup.isLink?((arg={isLink:!0}).count=Object.hasOwn(markup,"text")?2:1,arg.link=Wikifier.helpers.evalPassageId(markup.link),arg.text=Object.hasOwn(markup,"text")?Wikifier.helpers.evalText(markup.text):arg.link,arg.external=!markup.forceInternal&&Wikifier.isExternalLink(arg.link),arg.setFn=Object.hasOwn(markup,"setter")?Wikifier.helpers.shadowHandler(Scripting.desugar(markup.setter)):null):markup.isImage&&(arg=function(source){var imgObj={source:source,isImage:!0};if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(imgObj.source=passage.text,imgObj.passage=passage.name)}return imgObj}(Wikifier.helpers.evalPassageId(markup.source)),Object.hasOwn(markup,"align")&&(arg.align=markup.align),Object.hasOwn(markup,"text")&&(arg.title=Wikifier.helpers.evalText(markup.text)),Object.hasOwn(markup,"link")&&(arg.link=Wikifier.helpers.evalPassageId(markup.link),arg.external=!markup.forceInternal&&Wikifier.isExternalLink(arg.link)),arg.setFn=Object.hasOwn(markup,"setter")?Wikifier.helpers.shadowHandler(Scripting.desugar(markup.setter)):null)}args.push(arg)})),args}}()}),Wikifier.Parser.add({name:"link",profiles:["core"],match:"\\[\\[[^[]",handler:function(w){var markup=Wikifier.helpers.parseSquareBracketedMarkup(w);if(Object.hasOwn(markup,"error"))w.outputText(w.output,w.matchStart,w.nextMatch);else{w.nextMatch=markup.pos;var link=Wikifier.helpers.evalPassageId(markup.link),text=Object.hasOwn(markup,"text")?Wikifier.helpers.evalText(markup.text):link,setFn=Object.hasOwn(markup,"setter")?Wikifier.helpers.shadowHandler(Scripting.desugar(markup.setter)):null,output=(Config.debug?new DebugView(w.output,"link-markup","[[link]]",w.source.slice(w.matchStart,w.nextMatch)):w).output;markup.forceInternal||!Wikifier.isExternalLink(link)?Wikifier.createInternalLink(output,link,text,setFn):Wikifier.createExternalLink(output,link,text)}}}),Wikifier.Parser.add({name:"urlLink",profiles:["core"],match:Patterns.url,handler:function(w){w.outputText(Wikifier.createExternalLink(w.output,w.matchText),w.matchStart,w.nextMatch)}}),Wikifier.Parser.add({name:"image",profiles:["core"],match:"\\[[<>]?[Ii][Mm][Gg]\\[",handler:function(w){var markup=Wikifier.helpers.parseSquareBracketedMarkup(w);if(Object.hasOwn(markup,"error"))w.outputText(w.output,w.matchStart,w.nextMatch);else{var debugView;w.nextMatch=markup.pos,Config.debug&&(debugView=new DebugView(w.output,"image-markup",Object.hasOwn(markup,"link")?"[img[][link]]":"[img[]]",w.source.slice(w.matchStart,w.nextMatch))).modes({block:!0});var source,setFn=Object.hasOwn(markup,"setter")?Wikifier.helpers.shadowHandler(Scripting.desugar(markup.setter)):null,el=(Config.debug?debugView:w).output;if(Object.hasOwn(markup,"link")){var link=Wikifier.helpers.evalPassageId(markup.link);(el=markup.forceInternal||!Wikifier.isExternalLink(link)?Wikifier.createInternalLink(el,link,null,setFn):Wikifier.createExternalLink(el,link)).classList.add("link-image")}if(el=jQuery(document.createElement("img")).appendTo(el).get(0),"data:"!==(source=Wikifier.helpers.evalPassageId(markup.source)).slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(el.setAttribute("data-passage",passage.name),source=passage.text.trim())}el.src=source,Object.hasOwn(markup,"text")&&(el.title=Wikifier.helpers.evalText(markup.text)),Object.hasOwn(markup,"align")&&(el.align=markup.align)}}}),Wikifier.Parser.add({name:"monospacedByBlock",profiles:["block"],match:"^\\{\\{\\{\\n",lookahead:/^\{\{\{\n((?:^[^\n]*\n)+?)(^\}\}\}$\n?)/gm,handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);if(match&&match.index===w.matchStart){var pre=jQuery(document.createElement("pre"));jQuery(document.createElement("code")).text(match[1]).appendTo(pre),pre.appendTo(w.output),w.nextMatch=this.lookahead.lastIndex}}}),Wikifier.Parser.add({name:"formatByChar",profiles:["core"],match:"''|//|__|\\^\\^|~~|==|\\{\\{\\{",handler:function(w){switch(w.matchText){case"''":w.subWikify(jQuery(document.createElement("strong")).appendTo(w.output).get(0),"''");break;case"//":w.subWikify(jQuery(document.createElement("em")).appendTo(w.output).get(0),"//");break;case"__":w.subWikify(jQuery(document.createElement("u")).appendTo(w.output).get(0),"__");break;case"^^":w.subWikify(jQuery(document.createElement("sup")).appendTo(w.output).get(0),"\\^\\^");break;case"~~":w.subWikify(jQuery(document.createElement("sub")).appendTo(w.output).get(0),"~~");break;case"==":w.subWikify(jQuery(document.createElement("s")).appendTo(w.output).get(0),"==");break;case"{{{":var lookahead=/\{\{\{((?:.|\n)*?)\}\}\}/gm;lookahead.lastIndex=w.matchStart;var match=lookahead.exec(w.source);match&&match.index===w.matchStart&&(jQuery(document.createElement("code")).text(match[1]).appendTo(w.output),w.nextMatch=lookahead.lastIndex)}}}),Wikifier.Parser.add({name:"customStyle",profiles:["core"],match:"@@",terminator:"@@",blockRe:/\s*\n/gm,handler:function(w){var css=Wikifier.helpers.inlineCss(w);this.blockRe.lastIndex=w.nextMatch;var blockMatch=this.blockRe.exec(w.source),blockLevel=blockMatch&&blockMatch.index===w.nextMatch,$el=jQuery(document.createElement(blockLevel?"div":"span")).appendTo(w.output);0===css.classes.length&&""===css.id&&0===Object.keys(css.styles).length?$el.addClass("marked"):(css.classes.forEach((function(className){return $el.addClass(className)})),""!==css.id&&$el.attr("id",css.id),$el.css(css.styles)),blockLevel?(w.nextMatch+=blockMatch[0].length,w.subWikify($el[0],"\\n?".concat(this.terminator))):w.subWikify($el[0],this.terminator)}}),Wikifier.Parser.add({name:"verbatimText",profiles:["core"],match:'"{3}|<[Nn][Oo][Ww][Ii][Kk][Ii]>',lookahead:/(?:"{3}((?:.|\n)*?)"{3})|(?:<[Nn][Oo][Ww][Ii][Kk][Ii]>((?:.|\n)*?)<\/[Nn][Oo][Ww][Ii][Kk][Ii]>)/gm,handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);match&&match.index===w.matchStart&&(w.nextMatch=this.lookahead.lastIndex,jQuery(document.createElement("span")).addClass("verbatim").text(match[1]||match[2]).appendTo(w.output))}}),Wikifier.Parser.add({name:"horizontalRule",profiles:["core"],match:"^----+\\s*$",handler:function(w){jQuery(document.createElement("hr")).appendTo(w.output)}}),Wikifier.Parser.add({name:"emdash",profiles:["core"],match:"--",handler:function(w){jQuery(document.createTextNode("—")).appendTo(w.output)}}),Wikifier.Parser.add({name:"doubleDollarSign",profiles:["core"],match:"\\${2}",handler:function(w){jQuery(document.createTextNode("$")).appendTo(w.output)}}),Wikifier.Parser.add({name:"nakedVariable",profiles:["core"],match:"".concat(Patterns.variable,"(?:(?:\\.").concat(Patterns.identifier,")|(?:\\[\\d+\\])|(?:\\[\"(?:\\\\.|[^\"\\\\])+\"\\])|(?:\\['(?:\\\\.|[^'\\\\])+'\\])|(?:\\[").concat(Patterns.variable,"\\]))*"),handler:function(w){var result=State.getVar(w.matchText);null==result?jQuery(document.createTextNode(w.matchText)).appendTo(w.output):new Wikifier((Config.debug?new DebugView(w.output,"variable",w.matchText,w.matchText):w).output,stringFrom(result))}}),Wikifier.Parser.add({name:"template",profiles:["core"],match:"\\?".concat(Patterns.templateName),handler:function(w){var name=w.matchText.slice(1),template=Template.get(name),result=null;switch(template instanceof Array&&(template=template.random()),_typeof(template)){case"function":try{result=stringFrom(template.call({name:name}))}catch(ex){return appendError(w.output,"cannot execute function template ?".concat(name,": ").concat(ex.message),w.source.slice(w.matchStart,w.nextMatch))}break;case"string":result=template}null===result?jQuery(document.createTextNode(w.matchText)).appendTo(w.output):new Wikifier((Config.debug?new DebugView(w.output,"template",w.matchText,w.matchText):w).output,result)}}),Wikifier.Parser.add({name:"heading",profiles:["block"],match:"^!{1,6}",terminator:"\\n",handler:function(w){Wikifier.helpers.hasBlockContext(w.output.childNodes)?w.subWikify(jQuery(document.createElement("h".concat(w.matchLength))).appendTo(w.output).get(0),this.terminator):jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"table",profiles:["block"],match:"^\\|(?:[^\\n]*)\\|(?:[fhck]?)$",lookahead:/^\|([^\n]*)\|([fhck]?)$/gm,rowTerminator:"\\|(?:[cfhk]?)$\\n?",cellPattern:"(?:\\|([^\\n\\|]*)\\|)|(\\|[cfhk]?$\\n?)",cellTerminator:"(?:\\u0020*)\\|",rowTypes:{c:"caption",f:"tfoot",h:"thead","":"tbody"},handler:function(w){if(Wikifier.helpers.hasBlockContext(w.output.childNodes)){var matched,table=jQuery(document.createElement("table")).appendTo(w.output).get(0),prevColumns=[],curRowType=null,$rowContainer=null,rowCount=0;w.nextMatch=w.matchStart;do{this.lookahead.lastIndex=w.nextMatch;var match=this.lookahead.exec(w.source);if(matched=match&&match.index===w.nextMatch){var nextRowType=match[2];"k"===nextRowType?(table.className=match[1],w.nextMatch+=match[0].length+1):(nextRowType!==curRowType&&(curRowType=nextRowType,$rowContainer=jQuery(document.createElement(this.rowTypes[nextRowType])).appendTo(table)),"c"===curRowType?($rowContainer.css("caption-side",0===rowCount?"top":"bottom"),w.nextMatch+=1,w.subWikify($rowContainer[0],this.rowTerminator)):this.rowHandler(w,jQuery(document.createElement("tr")).appendTo($rowContainer).get(0),prevColumns),++rowCount)}}while(matched)}else jQuery(w.output).append(document.createTextNode(w.matchText))},rowHandler:function(w,rowEl,prevColumns){var matched,_this10=this,cellRe=new RegExp(this.cellPattern,"gm"),col=0,curColCount=1,_loop5=function(){cellRe.lastIndex=w.nextMatch;var cellMatch=cellRe.exec(w.source);if(matched=cellMatch&&cellMatch.index===w.nextMatch){if("~"===cellMatch[1]){var last=prevColumns[col];last&&(++last.rowCount,last.$element.attr("rowspan",last.rowCount).css("vertical-align","middle")),w.nextMatch=cellMatch.index+cellMatch[0].length-1}else if(">"===cellMatch[1])++curColCount,w.nextMatch=cellMatch.index+cellMatch[0].length-1;else{if(cellMatch[2])return w.nextMatch=cellMatch.index+cellMatch[0].length,1;++w.nextMatch;for(var $cell,css=Wikifier.helpers.inlineCss(w),spaceLeft=!1,spaceRight=!1;" "===w.source.substr(w.nextMatch,1);)spaceLeft=!0,++w.nextMatch;"!"===w.source.substr(w.nextMatch,1)?($cell=jQuery(document.createElement("th")).appendTo(rowEl),++w.nextMatch):$cell=jQuery(document.createElement("td")).appendTo(rowEl),prevColumns[col]={rowCount:1,$element:$cell},curColCount>1&&($cell.attr("colspan",curColCount),curColCount=1),w.subWikify($cell[0],_this10.cellTerminator)," "===w.matchText.substr(w.matchText.length-2,1)&&(spaceRight=!0),css.classes.forEach((function(className){return $cell.addClass(className)})),""!==css.id&&$cell.attr("id",css.id),spaceLeft&&spaceRight?css.styles["text-align"]="center":spaceLeft?css.styles["text-align"]="right":spaceRight&&(css.styles["text-align"]="left"),$cell.css(css.styles),w.nextMatch=w.nextMatch-1}++col}};do{if(_loop5())break}while(matched)}}),Wikifier.Parser.add({name:"list",profiles:["block"],match:"^(?:(?:\\*+)|(?:#+))",lookahead:/^(?:(\*+)|(#+))/gm,terminator:"\\n",handler:function(w){if(Wikifier.helpers.hasBlockContext(w.output.childNodes)){w.nextMatch=w.matchStart;var matched,i,destStack=[w.output],curType=null,curLevel=0;do{this.lookahead.lastIndex=w.nextMatch;var match=this.lookahead.exec(w.source);if(matched=match&&match.index===w.nextMatch){var newType=match[2]?"ol":"ul",newLevel=match[0].length;if(w.nextMatch+=match[0].length,newLevel>curLevel)for(i=curLevel;i<newLevel;++i)destStack.push(jQuery(document.createElement(newType)).appendTo(destStack[destStack.length-1]).get(0));else if(newLevel<curLevel)for(i=curLevel;i>newLevel;--i)destStack.pop();else newLevel===curLevel&&newType!==curType&&(destStack.pop(),destStack.push(jQuery(document.createElement(newType)).appendTo(destStack[destStack.length-1]).get(0)));curLevel=newLevel,curType=newType,w.subWikify(jQuery(document.createElement("li")).appendTo(destStack[destStack.length-1]).get(0),this.terminator)}}while(matched)}else jQuery(w.output).append(document.createTextNode(w.matchText))}}),Wikifier.Parser.add({name:"commentByBlock",profiles:["core"],match:"(?:/(?:%|\\*))|(?:\x3c!--)",lookahead:/(?:\/(%|\*)(?:(?:.|\n)*?)\1\/)|(?:<!--(?:(?:.|\n)*?)-->)/gm,handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);match&&match.index===w.matchStart&&(w.nextMatch=this.lookahead.lastIndex)}}),Wikifier.Parser.add({name:"lineContinuation",profiles:["core"],match:"\\\\".concat(Patterns.spaceNoTerminator,"*\\n|\\n").concat(Patterns.spaceNoTerminator,"*\\\\|\\n?\\\\").concat(Patterns.spaceNoTerminator,"*$|^").concat(Patterns.spaceNoTerminator,"*\\\\\\n?"),handler:function(w){w.nextMatch=w.matchStart+w.matchLength}}),Wikifier.Parser.add({name:"lineBreak",profiles:["core"],match:"\\n",handler:function(w){w.options.nobr||jQuery(document.createElement("br")).appendTo(w.output)}}),Wikifier.Parser.add({name:"htmlCharacterReference",profiles:["core"],match:"(?:(?:&#?[0-9A-Za-z]{2,8};|.)(?:&#?(?:x0*(?:3[0-6][0-9A-Fa-f]|1D[C-Fc-f][0-9A-Fa-f]|20[D-Fd-f][0-9A-Fa-f]|FE2[0-9A-Fa-f])|0*(?:76[89]|7[7-9][0-9]|8[0-7][0-9]|761[6-9]|76[2-7][0-9]|84[0-3][0-9]|844[0-7]|6505[6-9]|6506[0-9]|6507[0-1]));)+|&#?[0-9A-Za-z]{2,8};)",handler:function(w){jQuery(document.createDocumentFragment()).append(w.matchText).appendTo(w.output)}}),Wikifier.Parser.add({name:"xmlProlog",profiles:["core"],match:"<\\?[Xx][Mm][Ll][^>]*\\?>",handler:function(w){w.nextMatch=w.matchStart+w.matchLength}}),Wikifier.Parser.add({name:"verbatimHtml",profiles:["core"],match:"<[Hh][Tt][Mm][Ll]>",lookahead:/<[Hh][Tt][Mm][Ll]>((?:.|\n)*?)<\/[Hh][Tt][Mm][Ll]>/gm,handler:_verbatimTagHandler}),Wikifier.Parser.add({name:"verbatimScriptTag",profiles:["core"],match:"<[Ss][Cc][Rr][Ii][Pp][Tt][^>]*>",lookahead:/(<[Ss][Cc][Rr][Ii][Pp][Tt][^>]*>(?:.|\n)*?<\/[Ss][Cc][Rr][Ii][Pp][Tt]>)/gm,handler:_verbatimTagHandler}),Wikifier.Parser.add({name:"styleTag",profiles:["core"],match:"<[Ss][Tt][Yy][Ll][Ee][^>]*>",lookahead:/(<[Ss][Tt][Yy][Ll][Ee][^>]*>)((?:.|\n)*?)(<\/[Ss][Tt][Yy][Ll][Ee]>)/gm,imageMarkup:new RegExp(Patterns.cssImage,"g"),hasImageMarkup:new RegExp(Patterns.cssImage),handler:function(w){this.lookahead.lastIndex=w.matchStart;var match=this.lookahead.exec(w.source);if(match&&match.index===w.matchStart){w.nextMatch=this.lookahead.lastIndex;var css=match[2];this.hasImageMarkup.test(css)&&(this.imageMarkup.lastIndex=0,css=css.replace(this.imageMarkup,(function(wikiImage){var markup=Wikifier.helpers.parseSquareBracketedMarkup({source:wikiImage,matchStart:0});if(Object.hasOwn(markup,"error")||markup.pos<wikiImage.length)return wikiImage;var source=Wikifier.helpers.evalPassageId(markup.source);if("data:"!==source.slice(0,5)&&Story.has(source)){var passage=Story.get(source);passage.tags.includes("Twine.image")&&(source=passage.text)}return'url("'.concat(source.replace(/"/g,"%22"),'")')}))),jQuery(document.createDocumentFragment()).append(match[1]+css+match[3]).appendTo(w.output)}}}),Wikifier.Parser.add({name:"svgTag",profiles:["core"],match:"<[Ss][Vv][Gg][^>]*>",lookahead:/<(\/?)[Ss][Vv][Gg][^>]*>/gm,namespace:"http://www.w3.org/2000/svg",handler:function(w){var _this11=this;this.lookahead.lastIndex=w.nextMatch;for(var match,depth=1;depth>0&&null!==(match=this.lookahead.exec(w.source));)depth+="/"===match[1]?-1:1;if(0===depth){w.nextMatch=this.lookahead.lastIndex;var svgTag=w.source.slice(w.matchStart,this.lookahead.lastIndex),$frag=jQuery(document.createDocumentFragment()).append(svgTag);$frag.find("a[data-passage],image[data-passage]").each((function(_,el){var tagName=el.tagName.toLowerCase();try{_this11.processAttributeDirectives(el)}catch(ex){return appendError(w.output,"svg|<".concat(tagName,">: ").concat(ex.message),"".concat(w.matchText,"…"))}el.hasAttribute("data-passage")&&_this11.processDataAttributes(el,tagName)})),$frag.appendTo(w.output)}},processAttributeDirectives:function(el){Array.from(el.attributes).forEach((function(_ref11){var name=_ref11.name,value=_ref11.value,evalShorthand="@"===name[0];if(evalShorthand||name.startsWith("sc-eval:")){var result,newName=name.slice(evalShorthand?1:8);if("data-setter"===newName)throw new Error('evaluation directive is not allowed on the data-setter attribute: "'.concat(name,'"'));try{result=Scripting.evalTwineScript(value)}catch(ex){throw new Error('bad evaluation from attribute directive "'.concat(name,'": ').concat(ex.message))}try{el.setAttribute(newName,result),el.removeAttribute(name)}catch(ex){throw new Error('cannot transform attribute directive "'.concat(name,'" into attribute "').concat(newName,'"'))}}}))},processDataAttributes:function(el,tagName){var passage=el.getAttribute("data-passage");if(null!=passage){var evaluated=Wikifier.helpers.evalPassageId(passage);if(evaluated!==passage&&(passage=evaluated,el.setAttribute("data-passage",evaluated)),""!==passage)if("image"===tagName)"data:"!==passage.slice(0,5)&&Story.has(passage)&&(passage=Story.get(passage)).tags.includes("Twine.image")&&el.setAttribute("href",passage.text.trim());else{var setFn,setter=el.getAttribute("data-setter");null!=setter&&""!==(setter=String(setter).trim())&&(setFn=Wikifier.helpers.shadowHandler(Scripting.desugar(setter))),Story.has(passage)?(el.classList.add("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&el.classList.add("link-visited")):el.classList.add("link-broken"),jQuery(el).ariaClick({one:!0},(function(){"function"==typeof setFn&&setFn.call(this),Engine.play(passage)}))}}}}),Wikifier.Parser.add({name:"htmlTag",profiles:["core"],match:"<".concat(Patterns.htmlTagName,"(?:\\s+[^\\u0000-\\u001F\\u007F-\\u009F\\s\"'>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*?\"|'[^']*?'|[^\\s\"'=<>`]+))?)*\\s*\\/?>"),tagRe:new RegExp("^<(".concat(Patterns.htmlTagName,")")),mediaTags:["audio","img","source","track","video"],nobrTags:["audio","colgroup","datalist","dl","figure","meter","ol","optgroup","picture","progress","ruby","select","table","tbody","tfoot","thead","tr","ul","video"],voidTags:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],handler:function(w){var tagMatch=this.tagRe.exec(w.matchText),tag=tagMatch&&tagMatch[1],tagName=tag&&tag.toLowerCase();if(tagName){var terminator,terminatorMatch,isVoid=this.voidTags.includes(tagName)||w.matchText.endsWith("/>"),isNobr=this.nobrTags.includes(tagName);if(!isVoid){terminator="<\\/".concat(tagName,"\\s*>");var terminatorRe=new RegExp(terminator,"gim");terminatorRe.lastIndex=w.matchStart,terminatorMatch=terminatorRe.exec(w.source)}if(!isVoid&&!terminatorMatch)return appendError(w.output,"cannot find a closing tag for HTML <".concat(tag,">"),"".concat(w.matchText,"…"));var debugView,output=w.output,el=document.createElement(w.output.tagName);for(el.innerHTML=w.matchText;el.firstChild;)el=el.firstChild;try{this.processAttributeDirectives(el)}catch(ex){return appendError(w.output,"<".concat(tagName,">: ").concat(ex.message),"".concat(w.matchText,"…"))}if(el.hasAttribute("data-passage")){if(el.hasAttribute("href"))return appendError(w.output,"<".concat(tagName,'>: elements may not include both "data-passage" and "href" atttributes'),"".concat(w.matchText,"…"));this.processDataAttributes(el,tagName),Config.debug&&((debugView=new DebugView(w.output,"html-".concat(tagName),tagName,w.matchText)).modes({block:"img"===tagName,nonvoid:terminatorMatch}),output=debugView.output)}else el.hasAttribute("href")&&Wikifier.isExternalLink(el.getAttribute("href"))&&el.classList.add("link-external");if(terminatorMatch){try{Wikifier.Option.push({nobr:isNobr}),w.subWikify(el,terminator,{ignoreTerminatorCase:!0})}finally{Wikifier.Option.pop()}debugView&&jQuery(el).find(".debug.block").length>0&&debugView.modes({block:!0})}output.appendChild("track"===tagName?el.cloneNode(!0):el)}},processAttributeDirectives:function(el){Array.from(el.attributes).forEach((function(_ref12){var name=_ref12.name,value=_ref12.value,evalShorthand="@"===name[0];if(evalShorthand||name.startsWith("sc-eval:")){var result,newName=name.slice(evalShorthand?1:8);if("data-setter"===newName)throw new Error('evaluation directive is not allowed on the data-setter attribute: "'.concat(name,'"'));try{result=Scripting.evalTwineScript(value)}catch(ex){throw new Error('bad evaluation from attribute directive "'.concat(name,'": ').concat(ex.message))}try{el.setAttribute(newName,result),el.removeAttribute(name)}catch(ex){throw new Error('cannot transform attribute directive "'.concat(name,'" into attribute "').concat(newName,'"'))}}}))},processDataAttributes:function(el,tagName){var passage=el.getAttribute("data-passage");if(null!=passage){var evaluated=Wikifier.helpers.evalPassageId(passage);if(evaluated!==passage&&(passage=evaluated,el.setAttribute("data-passage",evaluated)),""!==passage)if(this.mediaTags.includes(tagName)){if("data:"!==passage.slice(0,5)&&Story.has(passage)){var parentName,twineTag;switch(passage=Story.get(passage),tagName){case"audio":case"video":twineTag="Twine.".concat(tagName);break;case"img":twineTag="Twine.image";break;case"track":twineTag="Twine.vtt";break;case"source":var $parent=$(el).closest("audio,picture,video");$parent.length>0&&(parentName=$parent.get(0).tagName.toLowerCase(),twineTag="Twine.".concat("picture"===parentName?"image":parentName))}passage.tags.includes(twineTag)&&(el["picture"===parentName?"srcset":"src"]=passage.text.trim())}}else{var setFn,setter=el.getAttribute("data-setter");null!=setter&&""!==(setter=String(setter).trim())&&(setFn=Wikifier.helpers.shadowHandler(Scripting.desugar(setter))),Story.has(passage)?(el.classList.add("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&el.classList.add("link-visited")):el.classList.add("link-broken"),jQuery(el).ariaClick({one:!0},(function(){"function"==typeof setFn&&setFn.call(this),Engine.play(passage)}))}}}})}();var Template=(_templates=new Map,_validNameRe=new RegExp("^(?:".concat(Patterns.templateName,")$")),_validType=function(template){var templateType=_typeof(template);return"function"===templateType||"string"===templateType},Object.preventExtensions(Object.create(null,{add:{value:function(name,template){if(!(_validType(template)||template instanceof Array&&template.length>0&&template.every(_validType)))throw new TypeError("invalid template type (".concat(name,"); templates must be: functions, strings, or an array of either"));(name instanceof Array?name:[name]).forEach((function(name){if(!_validNameRe.test(name))throw new Error('invalid template name "'.concat(name,'"'));if(_templates.has(name))throw new Error("cannot clobber existing template ?".concat(name));_templates.set(name,template)}))}},delete:{value:function(name){(name instanceof Array?name:[name]).forEach((function(name){return _templates.delete(name)}))}},get:{value:function(name){return _templates.has(name)?_templates.get(name):null}},has:{value:function(name){return _templates.has(name)}},size:{get:function(){return _templates.size}}}))),_templates,_validNameRe,_validType,Macro=function(){var _macros={},_tags={},_validNameRe=new RegExp("^(?:".concat(Patterns.macroName,")$"));function macrosHas(name){return Object.hasOwn(_macros,name)}function tagsRegister(parent,bodyTags){if(!parent)throw new Error("no parent specified");for(var endTags=["/".concat(parent),"end".concat(parent)],allTags=[].concat(endTags,Array.isArray(bodyTags)?bodyTags:[]),i=0;i<allTags.length;++i){var tag=allTags[i];if(macrosHas(tag))throw new Error("cannot register tag for an existing macro");tagsHas(tag)?_tags[tag].includes(parent)||(_tags[tag].push(parent),_tags[tag].sort()):_tags[tag]=[parent]}}function tagsUnregister(parent){if(!parent)throw new Error("no parent specified");Object.keys(_tags).forEach((function(tag){var i=_tags[tag].indexOf(parent);-1!==i&&(1===_tags[tag].length?delete _tags[tag]:_tags[tag].splice(i,1))}))}function tagsHas(name){return Object.hasOwn(_tags,name)}return Object.preventExtensions(Object.create(null,{add:{value:function macrosAdd(name,def){if(Array.isArray(name))name.forEach((function(name){return macrosAdd(name,def)}));else{if(!_validNameRe.test(name))throw new Error('invalid macro name "'.concat(name,'"'));if(macrosHas(name))throw new Error("cannot clobber existing macro <<".concat(name,">>"));if(tagsHas(name))throw new Error("cannot clobber child tag <<".concat(name,">> of parent macro").concat(1===_tags[name].length?"":"s"," <<").concat(_tags[name].join(">>, <<"),">>"));try{if("object"===_typeof(def))_macros[name]=Object.assign(Object.create(null),def,{_MACRO_API:!0});else{if(!macrosHas(def))throw new Error("cannot create alias of nonexistent macro <<".concat(def,">>"));_macros[name]=Object.create(_macros[def],{_ALIAS_OF:{enumerable:!0,value:def}})}Object.defineProperty(_macros,name,{writable:!1})}catch(ex){throw"TypeError"===ex.name?new Error("cannot clobber protected macro <<".concat(name,">>")):new Error("unknown error when attempting to add macro <<".concat(name,">>: [").concat(ex.name,"] ").concat(ex.message))}if(void 0!==_macros[name].tags)if(null==_macros[name].tags)tagsRegister(name);else{if(!Array.isArray(_macros[name].tags))throw new Error('bad value for "tags" property of macro <<'.concat(name,">>"));tagsRegister(name,_macros[name].tags)}}}},delete:{value:function macrosDelete(name){if(Array.isArray(name))name.forEach((function(name){return macrosDelete(name)}));else if(macrosHas(name)){void 0!==_macros[name].tags&&tagsUnregister(name);try{Object.defineProperty(_macros,name,{writable:!0}),delete _macros[name]}catch(ex){throw new Error("unknown error removing macro <<".concat(name,">>: ").concat(ex.message))}}else if(tagsHas(name))throw new Error("cannot remove child tag <<".concat(name,">> of parent macro <<").concat(_tags[name],">>"))}},isEmpty:{value:function(){return 0===Object.keys(_macros).length}},has:{value:macrosHas},get:{value:function(name){var macro=null;return macrosHas(name)&&"function"==typeof _macros[name].handler?macro=_macros[name]:Object.hasOwn(macros,name)&&"function"==typeof macros[name].handler&&(macro=macros[name]),macro}},init:{value:function(){var handler=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"init";Object.keys(_macros).forEach((function(name){"function"==typeof _macros[name][handler]&&_macros[name][handler](name)})),Object.keys(macros).forEach((function(name){"function"==typeof macros[name][handler]&&macros[name][handler](name)}))}},tags:{value:Object.preventExtensions(Object.create(null,{register:{value:tagsRegister},unregister:{value:tagsUnregister},has:{value:tagsHas},get:{value:function(name){return tagsHas(name)?_tags[name]:null}}}))},evalStatements:{value:function(){return Scripting.evalJavaScript.apply(Scripting,arguments)}}}))}(),MacroContext=function(){var MacroContext=function(){return _createClass((function MacroContext(contextData){_classCallCheck(this,MacroContext);var context=Object.assign({parent:null,macro:null,name:"",displayName:"",args:null,payload:null,parser:null,source:""},contextData);if(null===context.macro||""===context.name||null===context.parser)throw new TypeError("context object missing required properties");Object.defineProperties(this,{self:{value:context.macro},name:{value:void 0===context.macro._ALIAS_OF?context.name:context.macro._ALIAS_OF},displayName:{value:context.name},args:{value:context.args},payload:{value:context.payload},source:{value:context.source},parent:{value:context.parent},parser:{value:context.parser},_output:{value:context.parser.output},_shadows:{writable:!0,value:null},_debugView:{writable:!0,value:null},_debugViewEnabled:{writable:!0,value:Config.debug}})}),[{key:"output",get:function(){return this._debugViewEnabled?this.debugView.output:this._output}},{key:"shadows",get:function(){return Array.from(this._shadows)}},{key:"shadowView",get:function(){for(var view=new Set,context=this;null!==context;context=context.parent)context._shadows&&context._shadows.forEach((function(name){return view.add(name)}));return Array.from(view)}},{key:"debugView",get:function(){return this._debugViewEnabled?null!==this._debugView?this._debugView:this.createDebugView():null}},{key:"contextFilter",value:function(predicate,thisArg){if("function"!=typeof predicate)throw new TypeError("<MacroContext>.contextFilter() predicate parameter must be a function");for(var result=[],context=this.parent;null!==context;context=context.parent)predicate.call(void 0===thisArg?this:thisArg,context)&&result.push(context);return result}},{key:"contextFind",value:function(predicate,thisArg){if("function"!=typeof predicate)throw new TypeError("<MacroContext>.contextFind() predicate parameter must be a function");for(var context=this.parent;null!==context;context=context.parent)if(predicate.call(void 0===thisArg?this:thisArg,context))return context}},{key:"contextSome",value:function(predicate,thisArg){if("function"!=typeof predicate)throw new TypeError("<MacroContext>.contextSome() predicate parameter must be a function");for(var context=this.parent;null!==context;context=context.parent)if(predicate.call(void 0===thisArg?this:thisArg,context))return!0;return!1}},{key:"addShadow",value:function(){var _this12=this;this._shadows||(this._shadows=new Set);for(var varRe=new RegExp("^".concat(Patterns.variable,"$")),_len14=arguments.length,names=new Array(_len14),_key14=0;_key14<_len14;_key14++)names[_key14]=arguments[_key14];names.flat(1/0).forEach((function(name){if("string"!=typeof name)throw new TypeError("variable name must be a string; type: ".concat(_typeof(name)));if(!varRe.test(name))throw new Error('invalid variable name "'.concat(name,'"'));_this12._shadows.add(name)}))}},{key:"shadowHandler",value:function(callback,doneCallback,startCallback){var shadowStore,shadowContext=this;return"function"==typeof callback&&(shadowStore=Object.create(null),this.shadowView.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey]}))),function(){for(var _len15=arguments.length,args=new Array(_len15),_key15=0;_key15<_len15;_key15++)args[_key15]=arguments[_key15];if("function"==typeof startCallback&&startCallback.apply(this,args),"function"==typeof callback){var contextCache,shadowNames=Object.keys(shadowStore),valueCache=shadowNames.length>0?{}:null,macroParser=Wikifier.Parser.get("macro");try{shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;Object.hasOwn(store,varKey)&&(valueCache[varKey]=store[varKey]),store[varKey]=shadowStore[varName]})),contextCache=macroParser.context,macroParser.context=shadowContext,callback.apply(this,args)}finally{contextCache!==undefined&&(macroParser.context=contextCache),shadowNames.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;shadowStore[varName]=store[varKey],Object.hasOwn(valueCache,varKey)?store[varKey]=valueCache[varKey]:delete store[varKey]}))}}"function"==typeof doneCallback&&doneCallback.apply(this,args)}}},{key:"createDebugView",value:function(name,title){return this._debugView=new DebugView(this._output,"macro",name||this.displayName,title||this.source),null!==this.payload&&this.payload.length>0&&this._debugView.modes({nonvoid:!0}),this._debugViewEnabled=!0,this._debugView}},{key:"removeDebugView",value:function(){null!==this._debugView&&(this._debugView.remove(),this._debugView=null),this._debugViewEnabled=!1}},{key:"error",value:function(message,source){return appendError(this._output,"<<".concat(this.displayName,">>: ").concat(message),source||this.source)}}])}();return Object.defineProperties(MacroContext.prototype,{contextHas:{value:function(){console.warn("[DEPRECATED] <MacroContext>.contextHas() is deprecated.");for(var _len16=arguments.length,args=new Array(_len16),_key16=0;_key16<_len16;_key16++)args[_key16]=arguments[_key16];return MacroContext.prototype.contextSome.apply(this,args)}},contextSelect:{value:function(){console.warn("[DEPRECATED] <MacroContext>.contextSelect() is deprecated.");for(var _len17=arguments.length,args=new Array(_len17),_key17=0;_key17<_len17;_key17++)args[_key17]=arguments[_key17];return MacroContext.prototype.contextFind.apply(this,args)}},contextSelectAll:{value:function(){console.warn("[DEPRECATED] <MacroContext>.contextSelectAll() is deprecated.");for(var _len18=arguments.length,args=new Array(_len18),_key18=0;_key18<_len18;_key18++)args[_key18]=arguments[_key18];return MacroContext.prototype.contextFilter.apply(this,args)}},createShadowWrapper:{value:function(){console.warn("[DEPRECATED] <MacroContext>.createShadowWrapper() is deprecated.");for(var _len19=arguments.length,args=new Array(_len19),_key19=0;_key19<_len19;_key19++)args[_key19]=arguments[_key19];return MacroContext.prototype.shadowHandler.apply(this,args)}}}),MacroContext}();Macro.add(["addclass","toggleclass"],{handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("selector"),this.args.length<2&&errors.push("class names"),this.error("no ".concat(errors.join(" or ")," specified"))}var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));switch(this.name){case"addclass":$targets.addClass(this.args[1].trim());break;case"toggleclass":$targets.toggleClass(this.args[1].trim())}Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add(["append","prepend","replace"],{tags:null,t8nRe:/^(?:transition|t8n)$/,handler:function(){var _this13=this;if(0===this.args.length)return this.error("no selector specified");var $insert,$targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));if(""!==this.payload[0].contents)switch(this.args.length>1&&this.self.t8nRe.test(this.args[1])?(($insert=jQuery(document.createElement("span"))).addClass("macro-".concat(this.name,"-insert macro-").concat(this.name,"-in")),setTimeout((function(){return $insert.removeClass("macro-".concat(_this13.name,"-in"))}),Engine.DOM_DELAY)):$insert=jQuery(document.createDocumentFragment()),$insert.wiki(this.payload[0].contents),this.name){case"replace":$targets.empty();case"append":$targets.append($insert);break;case"prepend":$targets.prepend($insert)}else"replace"===this.name&&$targets.empty();Config.debug&&this.debugView.modes({hidden:!0})}}),function(){if(Has.audio){var errorOnePlaybackAction=function(cur,prev){return'only one playback action allowed per invocation, "'.concat(cur,'" cannot be combined with "').concat(prev,'"')};Macro.add("audio",{handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("track and/or group IDs"),this.args.length<2&&errors.push("actions"),this.error("no ".concat(errors.join(" or ")," specified"))}var selected;try{selected=SimpleAudio.select(this.args[0])}catch(ex){return this.error(ex.message)}for(var action,fadeTo,loop,mute,passage,time,volume,args=this.args.slice(1),fadeOver=5;args.length>0;){var arg=args.shift(),raw=void 0;switch(arg){case"load":case"pause":case"play":case"stop":case"unload":if(action)return this.error(errorOnePlaybackAction(arg,action));action=arg;break;case"fadein":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=1;break;case"fadeout":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=0;break;case"fadeto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(0===args.length)return this.error("fadeto missing required level value");if(action="fade",raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeto: ".concat(raw));break;case"fadeoverto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(args.length<2){var _errors=[];return args.length<1&&_errors.push("seconds"),args.length<2&&_errors.push("level"),this.error("fadeoverto missing required ".concat(_errors.join(" and ")," value").concat(_errors.length>1?"s":""))}if(action="fade",raw=args.shift(),fadeOver=Number.parseFloat(raw),Number.isNaN(fadeOver)||!Number.isFinite(fadeOver))return this.error("cannot parse fadeoverto: ".concat(raw));if(raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeoverto: ".concat(raw));break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),volume=Number.parseFloat(raw),Number.isNaN(volume)||!Number.isFinite(volume))return this.error("cannot parse volume: ".concat(raw));break;case"mute":case"unmute":mute="mute"===arg;break;case"time":if(0===args.length)return this.error("time missing required seconds value");if(raw=args.shift(),time=Number.parseFloat(raw),Number.isNaN(time)||!Number.isFinite(time))return this.error("cannot parse time: ".concat(raw));break;case"loop":case"unloop":loop="loop"===arg;break;case"goto":if(0===args.length)return this.error("goto missing required passage title");if(raw=args.shift(),passage="object"===_typeof(raw)?raw.link:raw,!Story.has(passage))return this.error('passage "'.concat(passage,'" does not exist'));break;default:return this.error("unknown action: ".concat(arg))}}try{if(null!=volume&&selected.volume(volume),null!=time&&selected.time(time),null!=mute&&selected.mute(mute),null!=loop&&selected.loop(loop),null!=passage){var nsEnded="ended.macros.macro-".concat(this.name,"_goto");selected.off(nsEnded).one(nsEnded,(function(){selected.off(nsEnded),Engine.play(passage)}))}switch(action){case"fade":selected.fade(fadeOver,fadeTo);break;case"load":selected.load();break;case"pause":selected.pause();break;case"play":selected.playWhenAllowed();break;case"stop":selected.stop();break;case"unload":selected.unload()}Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error("error executing action: ".concat(ex.message))}}}),Macro.add("cacheaudio",{handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("track ID"),this.args.length<2&&errors.push("sources"),this.error("no ".concat(errors.join(" or ")," specified"))}var id=String(this.args[0]).trim();try{SimpleAudio.tracks.add(id,this.args.slice(1))}catch(ex){return this.error(ex.message)}if(Config.debug&&!SimpleAudio.tracks.get(id).hasSource())return this.error('track ID "'.concat(id,'": no supported audio sources found'));Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("createaudiogroup",{tags:["track"],handler:function(){if(0===this.args.length)return this.error("no group ID specified");if(1===this.payload.length)return this.error("no tracks defined via <<track>>");Config.debug&&this.debugView.modes({nonvoid:!1,hidden:!0});for(var groupId=String(this.args[0]).trim(),trackIds=[],i=1,len=this.payload.length;i<len;++i){if(this.payload[i].args.length<1)return this.error("no track ID specified");trackIds.push(String(this.payload[i].args[0]).trim()),Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0})}try{SimpleAudio.groups.add(groupId,trackIds)}catch(ex){return this.error(ex.message)}Config.debug&&this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!0})}}),Macro.add("createplaylist",{tags:["track"],handler:function(){if(0===this.args.length)return this.error("no list ID specified");if(1===this.payload.length)return this.error("no tracks defined via <<track>>");Config.debug&&this.debugView.modes({nonvoid:!1,hidden:!0});for(var listId=String(this.args[0]).trim(),trackObjs=[],i=1,len=this.payload.length;i<len;++i){if(0===this.payload[i].args.length)return this.error("no track ID specified");for(var trackObj={id:String(this.payload[i].args[0]).trim()},args=this.payload[i].args.slice(1);args.length>0;){var arg=args.shift(),raw=void 0,parsed=void 0;switch(arg){case"own":trackObj.own=!0;break;case"rate":args.length>0&&args.shift();break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),parsed=Number.parseFloat(raw),Number.isNaN(parsed)||!Number.isFinite(parsed))return this.error("cannot parse volume: ".concat(raw));trackObj.volume=parsed;break;default:return this.error("unknown action: ".concat(arg))}}trackObjs.push(trackObj),Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0})}try{SimpleAudio.lists.add(listId,trackObjs)}catch(ex){return this.error(ex.message)}Config.debug&&this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!0})}}),Macro.add("masteraudio",{handler:function(){if(0===this.args.length)return this.error("no actions specified");for(var action,mute,muteOnHide,volume,args=this.args.slice(0);args.length>0;){var arg=args.shift(),raw=void 0;switch(arg){case"load":case"stop":case"unload":if(action)return this.error(errorOnePlaybackAction(arg,action));action=arg;break;case"mute":case"unmute":mute="mute"===arg;break;case"muteonhide":case"nomuteonhide":muteOnHide="muteonhide"===arg;break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),volume=Number.parseFloat(raw),Number.isNaN(volume)||!Number.isFinite(volume))return this.error("cannot parse volume: ".concat(raw));break;default:return this.error("unknown action: ".concat(arg))}}try{switch(null!=mute&&SimpleAudio.mute(mute),null!=muteOnHide&&SimpleAudio.muteOnHidden(muteOnHide),null!=volume&&SimpleAudio.volume(volume),action){case"load":SimpleAudio.load();break;case"stop":SimpleAudio.stop();break;case"unload":SimpleAudio.unload()}Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error("error executing action: ".concat(ex.message))}}}),Macro.add("playlist",{handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("list ID"),this.args.length<2&&errors.push("actions"),this.error("no ".concat(errors.join(" or ")," specified"))}var id=String(this.args[0]).trim();if(!SimpleAudio.lists.has(id))return this.error('playlist "'.concat(id,'" does not exist'));for(var action,fadeTo,loop,mute,shuffle,volume,list=SimpleAudio.lists.get(id),args=this.args.slice(1),fadeOver=5;args.length>0;){var arg=args.shift(),raw=void 0;switch(arg){case"load":case"pause":case"play":case"skip":case"stop":case"unload":if(action)return this.error(errorOnePlaybackAction(arg,action));action=arg;break;case"fadein":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=1;break;case"fadeout":if(action)return this.error(errorOnePlaybackAction(arg,action));action="fade",fadeTo=0;break;case"fadeto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(0===args.length)return this.error("fadeto missing required level value");if(action="fade",raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeto: ".concat(raw));break;case"fadeoverto":if(action)return this.error(errorOnePlaybackAction(arg,action));if(args.length<2){var _errors2=[];return args.length<1&&_errors2.push("seconds"),args.length<2&&_errors2.push("level"),this.error("fadeoverto missing required ".concat(_errors2.join(" and ")," value").concat(_errors2.length>1?"s":""))}if(action="fade",raw=args.shift(),fadeOver=Number.parseFloat(raw),Number.isNaN(fadeOver)||!Number.isFinite(fadeOver))return this.error("cannot parse fadeoverto: ".concat(raw));if(raw=args.shift(),fadeTo=Number.parseFloat(raw),Number.isNaN(fadeTo)||!Number.isFinite(fadeTo))return this.error("cannot parse fadeoverto: ".concat(raw));break;case"volume":if(0===args.length)return this.error("volume missing required level value");if(raw=args.shift(),volume=Number.parseFloat(raw),Number.isNaN(volume)||!Number.isFinite(volume))return this.error("cannot parse volume: ".concat(raw));break;case"mute":case"unmute":mute="mute"===arg;break;case"loop":case"unloop":loop="loop"===arg;break;case"shuffle":case"unshuffle":shuffle="shuffle"===arg;break;default:return this.error("unknown action: ".concat(arg))}}try{switch(null!=volume&&list.volume(volume),null!=mute&&list.mute(mute),null!=loop&&list.loop(loop),null!=shuffle&&list.shuffle(shuffle),action){case"fade":list.fade(fadeOver,fadeTo);break;case"load":list.load();break;case"pause":list.pause();break;case"play":list.playWhenAllowed();break;case"skip":list.skip();break;case"stop":list.stop();break;case"unload":list.unload()}Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error("error executing action: ".concat(ex.message))}}}),Macro.add("removeaudiogroup",{handler:function(){if(0===this.args.length)return this.error("no group ID specified");var id=String(this.args[0]).trim();if(!SimpleAudio.groups.has(id))return this.error('group "'.concat(id,'" does not exist'));SimpleAudio.groups.delete(id),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("removeplaylist",{handler:function(){if(0===this.args.length)return this.error("no list ID specified");var id=String(this.args[0]).trim();if(!SimpleAudio.lists.has(id))return this.error('playlist "'.concat(id,'" does not exist'));SimpleAudio.lists.delete(id),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("waitforaudio",{skipArgs:!0,handler:function(){SimpleAudio.loadWithScreen()}})}else Macro.add(["audio","cacheaudio","createaudiogroup","createplaylist","masteraudio","playlist","removeaudiogroup","removeplaylist","waitforaudio"],{skipArgs:!0,handler:function(){Config.debug&&this.debugView.modes({hidden:!0})}})}(),Macro.add(["back","return"],{handler:function(){var passage,content,$link,momentIndex=-1;if(this.args.length>0)if("object"===_typeof(this.args[0]))if(this.args[0].isImage){content=document.createElement("img");var $image=jQuery(content).attr("src",this.args[0].source);Object.hasOwn(this.args[0],"passage")&&$image.attr("data-passage",this.args[0].passage),Object.hasOwn(this.args[0],"title")&&$image.attr("title",this.args[0].title),Object.hasOwn(this.args[0],"align")&&$image.attr("align",this.args[0].align),Object.hasOwn(this.args[0],"link")&&(passage=this.args[0].link)}else content=document.createTextNode(this.args[0].text),passage=this.args[0].link;else{content=document.createDocumentFragment();var forbidden=jQuery(content).wikiWithOptions({cleanup:!1,profile:"core"},this.args[0]).getForbiddenInteractiveContentTagNames();if(forbidden.length>0)throw new Error("text content contains restricted elements: <".concat(forbidden.join(">, <"),">"));passage=this.args.length>1?this.args[1]:undefined}if(null==passage){for(var i=State.length-2;i>=0;--i)if(State.history[i].title!==State.passage){momentIndex=i,passage=State.history[i].title;break}if(null==passage&&"return"===this.name)for(var _i6=State.expired.length-1;_i6>=0;--_i6)if(State.expired[_i6]!==State.passage){passage=State.expired[_i6];break}}else{if(!Story.has(passage))return this.error('passage "'.concat(passage,'" does not exist'));if("back"===this.name){for(var _i7=State.length-2;_i7>=0;--_i7)if(State.history[_i7].title===passage){momentIndex=_i7;break}if(-1===momentIndex)return this.error('cannot find passage "'.concat(passage,'" in the current story history'))}}if(null==passage)return this.error("cannot find passage");"back"!==this.name||-1!==momentIndex?($link=jQuery(document.createElement("a")).addClass("link-internal").ariaClick({one:!0},"return"===this.name?function(){return Engine.play(passage)}:function(){return Engine.goTo(momentIndex)}),content instanceof HTMLImageElement&&$link.addClass("link-image")):$link=jQuery(document.createElement("span")).addClass("link-disabled"),$link.addClass("macro-".concat(this.name)).append(content||document.createTextNode(L10n.get("macro".concat(this.name.toUpperFirst(),"Text")))).appendTo(this.output)}}),Macro.add(["button","link"],{isAsync:!0,tags:null,handler:function(){var _this14=this;if(0===this.args.length)return this.error("no ".concat("button"===this.name?"button":"link"," text specified"));var passage,$link=jQuery(document.createElement("button"===this.name?"button":"a"));if("object"===_typeof(this.args[0]))if(this.args[0].isImage){var $image=jQuery(document.createElement("img")).attr("src",this.args[0].source).appendTo($link);$link.addClass("link-image"),Object.hasOwn(this.args[0],"passage")&&$image.attr("data-passage",this.args[0].passage),Object.hasOwn(this.args[0],"title")&&$image.attr("title",this.args[0].title),Object.hasOwn(this.args[0],"align")&&$image.attr("align",this.args[0].align),passage=this.args[0].link}else $link.append(document.createTextNode(this.args[0].text)),passage=this.args[0].link;else{var $frag=jQuery(document.createDocumentFragment()).wikiWithOptions({cleanup:!1,profile:"core"},this.args[0]),forbidden=$frag.getForbiddenInteractiveContentTagNames();if(forbidden.length>0)throw new Error("text content contains restricted elements: <".concat(forbidden.join(">, <"),">"));$link.append($frag),passage=this.args.length>1?this.args[1]:undefined}null!=passage?($link.attr("data-passage",passage),Story.has(passage)?($link.addClass("link-internal"),Config.addVisitedLinkClass&&State.hasPlayed(passage)&&$link.addClass("link-visited")):$link.addClass("link-broken")):$link.addClass("link-internal"),$link.addClass("macro-".concat(this.name)).ariaClick({namespace:".macros",role:null!=passage?"link":"button",one:null!=passage},this.shadowHandler(""!==this.payload[0].contents?function(){return Wikifier.wikifyEval(_this14.payload[0].contents.trim())}:null,null!=passage?function(){return Engine.play(passage)}:null)).appendTo(this.output)}}),Macro.add("capture",{skipArgs:!0,tags:null,tsVarRe:new RegExp("(".concat(Patterns.variable,")"),"g"),handler:function(){if(0===this.args.raw.length)return this.error("no story/temporary variable list specified");var valueCache={};try{for(var match,tsVarRe=this.self.tsVarRe;null!==(match=tsVarRe.exec(this.args.raw));){var varName=match[1],varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;Object.hasOwn(store,varKey)&&(valueCache[varKey]=store[varKey]),this.addShadow(varName)}new Wikifier(this.output,this.payload[0].contents)}finally{this.shadows.forEach((function(varName){var varKey=varName.slice(1),store="$"===varName[0]?State.variables:State.temporary;Object.hasOwn(valueCache,varKey)?store[varKey]=valueCache[varKey]:delete store[varKey]}))}}}),Macro.add("checkbox",{isAsync:!0,handler:function(){if(this.args.length<3){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("unchecked value"),this.args.length<3&&errors.push("checked value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));var varId=createSlug(varName),uncheckValue=this.args[1],checkValue=this.args[2],el=document.createElement("input");switch(jQuery(el).attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),type:"checkbox",tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.shadowHandler((function(){State.setVar(varName,this.checked?checkValue:uncheckValue)}))).appendTo(this.output),this.args[3]){case"autocheck":State.getVar(varName)===checkValue?el.checked=!0:State.setVar(varName,uncheckValue);break;case"checked":el.checked=!0,State.setVar(varName,checkValue);break;default:State.setVar(varName,uncheckValue)}}}),Macro.add("copy",{handler:function(){if(0===this.args.length)return this.error("no selector specified");var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));jQuery(this.output).append($targets.html()),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add(["cycle","listbox"],{isAsync:!0,skipArgs:["optionsfrom"],tags:["option","optionsfrom"],handler:function(){var _this15=this;if(0===this.args.length)return this.error("no variable name specified");if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));var varId=createSlug(varName),len=this.payload.length;if(1===len)return this.error("no options specified");for(var config={autoselect:!1,once:!1},i=1;i<this.args.length;++i){var arg=this.args[i];switch(arg){case"once":config.once=!0;break;case"autoselect":config.autoselect=!0;break;default:return this.error("unknown argument: ".concat(arg))}}for(var _ret,options=[],tagCount={option:0,optionsfrom:0},index=-1,_loop6=function(){var payload=_this15.payload[_i8];if("option"===payload.name){if(++tagCount.option,0===payload.args.length)return{v:_this15.error("no arguments specified for <<".concat(payload.name,">> (#").concat(tagCount.option,")"))};var option={label:String(payload.args[0])},isSelected=!1;switch(payload.args.length){case 1:option.value=payload.args[0];break;case 2:"selected"===payload.args[1]?(option.value=payload.args[0],isSelected=!0):option.value=payload.args[1];break;default:option.value=payload.args[1],"selected"===payload.args[2]&&(isSelected=!0)}if(options.push(option),isSelected){if(config.autoselect)return{v:_this15.error("cannot specify both the autoselect and selected keywords")};if(-1!==index)return{v:_this15.error("multiple selected keywords specified for <<".concat(payload.name,">> (#").concat(index+1," & #").concat(tagCount.option,")"))};index=options.length-1}}else{if(++tagCount.optionsfrom,0===payload.args.full.length)return{v:_this15.error("no expression specified for <<".concat(payload.name,">> (#").concat(tagCount.optionsfrom,")"))};var result;try{var exp=payload.args.full;result=Scripting.evalJavaScript("{"===exp[0]?"(".concat(exp,")"):exp)}catch(ex){return{v:_this15.error("bad evaluation: ".concat(getErrorMessage(ex)))}}if("object"!==_typeof(result)||null===result)return{v:_this15.error("expression must yield a supported collection or generic object (type: ".concat(null===result?"null":_typeof(result),")"))};if(result instanceof Array||result instanceof Set)result.forEach((function(val){return options.push({label:String(val),value:val})}));else if(result instanceof Map)result.forEach((function(val,key){return options.push({label:String(key),value:val})}));else{var oType=getToStringTag(result);if("Object"!==oType)return{v:_this15.error("expression must yield a supported collection or generic object (object type: ".concat(oType,")"))};Object.keys(result).forEach((function(key){return options.push({label:key,value:result[key]})}))}}},_i8=1;_i8<len;++_i8)if(_ret=_loop6())return _ret.v;if(-1===index)if(config.autoselect){var curValue=State.getVar(varName),curValueIndex=options.findIndex((function(opt){return sameValueZero(opt.value,curValue)}));index=-1===curValueIndex?0:curValueIndex}else index=0;if("cycle"===this.name){var lastIndex=options.length-1;if(config.once&&index===lastIndex)jQuery(this.output).wikiWithOptions({cleanup:!1,profile:"core"},options[index].label);else{var cycleIndex=index;jQuery(document.createElement("a")).wikiWithOptions({cleanup:!1,profile:"core"},options[index].label).attr("id","".concat(this.name,"-").concat(varId)).addClass("macro-".concat(this.name)).ariaClick({namespace:".macros",role:"button"},this.shadowHandler((function(){var $this=$(this);cycleIndex=(cycleIndex+1)%options.length,State.setVar(varName,options[cycleIndex].value),$this.empty().wikiWithOptions({cleanup:!1,profile:"core"},options[cycleIndex].label),config.once&&cycleIndex===lastIndex&&$this.off().contents().unwrap()}))).appendTo(this.output)}}else{var $select=jQuery(document.createElement("select"));options.forEach((function(opt,i){jQuery(document.createElement("option")).val(i).text(opt.label).appendTo($select)})),$select.attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),tabindex:0}).addClass("macro-".concat(this.name)).val(index).on("change.macros",this.shadowHandler((function(){State.setVar(varName,options[Number(this.value)].value)}))).appendTo(this.output)}State.setVar(varName,options[index].value)}}),jQuery(document).on(":redo",(function(ev){var evTags=ev.detail&&ev.detail.tags||[],selector=0===evTags.length?".".concat("redo-target"):evTags.map((function(tag){return".".concat("redo-target",'[data-do-tags~="').concat(tag,'"]')})).join(", ");triggerEvent(":redo-internal",jQuery(selector),{bubbles:!1,detail:ev.detail})})),Macro.add("do",{tags:null,handler:function(){for(var elTag="span",tags=[],options=this.args.slice();options.length>0;){var option=options.shift();switch(option){case"tag":if(0===options.length)return this.error("tag option missing required tag name(s)");var raw=String(options.shift()).trim();if(""===raw)throw new Error("tag option tag name(s) must be non-empty");tags=String(raw).trim().splitOrEmpty(/\s+/);break;case"element":if(0===options.length)return this.error("element option missing required element tag name");if(""===(elTag=String(options.shift()).trim()))throw new Error("element option tag name must be non-empty");break;default:return this.error("unknown option: ".concat(option))}}var contents=this.payload[0].contents;if(""!==contents.trim()){Config.debug&&this.debugView.modes({block:"span"!==elTag});var $target=jQuery(document.createElement(elTag)).addClass("macro-".concat(this.name," ").concat("redo-target")).attr("data-do-tags",tags.join(" ")).wiki(contents).on(":redo-internal",jQuery.throttle(Engine.DOM_DELAY,this.shadowHandler((function(){var frag=document.createDocumentFragment();new Wikifier(frag,contents),$target.empty().append(frag)})))).appendTo(this.output)}}}),Macro.add("redo",{handler:function(){var failRE=/^(?:do|for)$/,passRE=/^(?:button|link(?:append|prepend|replace)?)$/,closest=this.contextFind((function(ctx){return failRE.test(ctx.name)||passRE.test(ctx.name)}));if(closest&&failRE.test(closest.name))return this.error("must not be used directly within macro <<".concat(closest.name,">>"));var tags=this.args.length>0?String(this.args[0]).trim().splitOrEmpty(/\s+/):[];triggerEvent(":redo",document,{detail:{tags:tags}})}}),Macro.add("done",{skipArgs:!0,tags:null,handler:function(){var contents=this.payload[0].contents.trim();""!==contents&&setTimeout(this.shadowHandler((function(){return $.wiki(contents)})),Engine.DOM_DELAY)}}),Macro.add("for",{skipArgs:!0,tags:null,isRangeRe:new RegExp("^(?:\\S".concat(Patterns.anyChar,"*?\\s+)?range\\s+\\S").concat(Patterns.anyChar,"*?$")),rangeRe:new RegExp("^(?:(?:State\\.(variables|temporary)\\.(".concat(Patterns.identifier,")\\s*,\\s*)?State\\.(variables|temporary)\\.(").concat(Patterns.identifier,")\\s+)?range\\s+(\\S").concat(Patterns.anyChar,"*?)$")),threePartRe:/^([^;]*?)\s*;\s*([^;]*?)\s*;\s*([^;]*?)$/,forInRe:/^\S+\s+in\s+\S+/i,forOfRe:/^\S+\s+of\s+\S+/i,handler:function(){var argsStr=this.args.full.trim(),payload=this.payload[0].contents.replace(/\n$/,"");if(0===argsStr.length)this.self.handleFor.call(this,payload,null,!0,null);else if(this.self.isRangeRe.test(argsStr)){var parts=argsStr.match(this.self.rangeRe);if(null===parts)return this.error("invalid range form syntax, format: [[index ,] value] range collection");this.self.handleForRange.call(this,payload,{type:parts[1],name:parts[2]},{type:parts[3],name:parts[4]},parts[5])}else{var init,condition,post;if(-1===argsStr.indexOf(";")){if(this.self.forInRe.test(argsStr))return this.error("invalid syntax, for…in is not supported; see: for…range");if(this.self.forOfRe.test(argsStr))return this.error("invalid syntax, for…of is not supported; see: for…range");condition=argsStr}else{var _parts=argsStr.match(this.self.threePartRe);if(null===_parts)return this.error("invalid 3-part conditional form syntax, format: [init] ; [condition] ; [post]");init=_parts[1],condition=_parts[2].trim(),post=_parts[3],0===condition.length&&(condition=!0)}this.self.handleFor.call(this,payload,init,condition,post)}},handleFor:function(payload,init,condition,post){var evalJavaScript=Scripting.evalJavaScript,first=!0,safety=Config.macros.maxLoopIterations;Config.debug&&this.debugView.modes({block:!0});try{if(TempState.break=null,init)try{evalJavaScript(init)}catch(ex){return this.error("bad init expression: ".concat(getErrorMessage(ex)))}for(;evalJavaScript(condition);){if(--safety<0)return this.error("exceeded configured maximum loop iterations (".concat(Config.macros.maxLoopIterations,")"));if(new Wikifier(this.output,first?payload.replace(/^\n/,""):payload),first&&(first=!1),null!=TempState.break)if(1===TempState.break)TempState.break=null;else if(2===TempState.break){TempState.break=null;break}if(post)try{evalJavaScript(post)}catch(ex){return this.error("bad post expression: ".concat(getErrorMessage(ex)))}}}catch(ex){return this.error("bad conditional expression: ".concat(getErrorMessage(ex)))}finally{TempState.break=null}},handleForRange:function(payload,keyVar,valueVar,rangeExp){var rangeable,first=!0;try{rangeable=this.self.toRangeable(rangeExp)}catch(ex){return this.error(ex.message)}Config.debug&&this.debugView.modes({block:!0});try{for(TempState.break=null;;){var entry=rangeable.next();if(entry.done)break;if(keyVar.name&&(State[keyVar.type][keyVar.name]=entry.key),valueVar.name&&(State[valueVar.type][valueVar.name]=entry.value),new Wikifier(this.output,first?payload.replace(/^\n/,""):payload),first&&(first=!1),null!=TempState.break)if(1===TempState.break)TempState.break=null;else if(2===TempState.break){TempState.break=null;break}}}catch(ex){return this.error(getErrorMessage(ex))}finally{TempState.break=null}},toRangeable:function(rangeExp){var collection;try{collection=Scripting.evalJavaScript("{"===rangeExp[0]?"(".concat(rangeExp,")"):rangeExp)}catch(ex){if("object"!==_typeof(ex))throw new Error("bad range expression: ".concat(ex));throw ex.message="bad range expression: ".concat(ex.message),ex}switch(_typeof(collection)){case"number":if(Number.isNaN(collection)||!Number.isFinite(collection))throw new Error("unsupported range expression type: ".concat(stringFrom(collection)));if(!Number.isInteger(collection))throw new Error("unsupported range expression type: floating-point number");if(!Number.isSafeInteger(collection))throw new Error("unsupported range expression type: unsafe integer");return collection<=0?{next:function(){return{done:!0}}}:{end:collection,pos:0,next:function(){if(this.pos<this.end){var key=this.pos++;return{key:key,value:key,done:!1}}return{done:!0}}};case"string":return{list:collection,end:collection.length,pos:0,next:function(){if(this.pos<this.end){var O=charAndPosAt(this.list,this.pos),key=this.pos;return this.pos=O.end+1,{key:key,value:O.char,done:!1}}return{done:!0}}};case"object":if(collection instanceof Array)return{list:collection,end:collection.length,pos:0,next:function(){if(this.pos<this.end){var key=this.pos++;return{key:key,value:this.list[key],done:!1}}return{done:!0}}};if(collection instanceof Set)return{list:collection=Array.from(collection),end:collection.length,pos:0,next:function(){if(this.pos<this.end){var key=this.pos++;return{key:key,value:this.list[key],done:!1}}return{done:!0}}};if(collection instanceof Map){var keys=Array.from(collection.keys());return{keys:keys,list:collection,end:keys.length,pos:0,next:function(){if(this.pos<this.end){var key=this.keys[this.pos++];return{key:key,value:this.list.get(key),done:!1}}return{done:!0}}}}if("Object"===getToStringTag(collection)){var _keys=Object.keys(collection);return{keys:_keys,list:collection,end:_keys.length,pos:0,next:function(){if(this.pos<this.end){var key=this.keys[this.pos++];return{key:key,value:this.list[key],done:!1}}return{done:!0}}}}throw new Error("unsupported range expression type: ".concat(getToStringTag(collection)));default:throw new Error("unsupported range expression type: ".concat(_typeof(collection)))}}}),Macro.add(["break","continue"],{skipArgs:!0,handler:function(){if(!this.contextSome((function(ctx){return"for"===ctx.name})))return this.error("must only be used in conjunction with its parent macro <<for>>");TempState.break="continue"===this.name?1:2,Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("goto",{handler:function(){return 0===this.args.length?this.error("no passage specified"):(passage="object"===_typeof(this.args[0])?this.args[0].link:this.args[0],Story.has(passage)?void setTimeout((function(){return Engine.play(passage)}),Engine.DOM_DELAY):this.error('passage "'.concat(passage,'" does not exist')));var passage}}),Macro.add("if",{skipArgs:!0,tags:["elseif","else"],isElseifWsRE:/^\s*if\b/i,isAssignRE:/[^!%&*+\-/<=>?^|]=[^=>]/,isLiteralRE:new RegExp(["(?:\"\"|''|``)",'(?:"(?:\\\\.|[^"\\\\])+")',"(?:'(?:\\\\.|[^'\\\\])+')","(?:`(?:\\\\.|[^`\\\\])+`)"].join("|"),"g"),handler:function(){var i;try{var len=this.payload.length,isElseifWsRE=this.self.isElseifWsRE,isAssignRE=this.self.isAssignRE,isLiteralRE=this.self.isLiteralRE;for(i=0;i<len;++i)if("else"===this.payload[i].name){if(this.payload[i].args.raw.length>0)return isElseifWsRE.test(this.payload[i].args.raw)?this.error('whitespace is not allowed between the "else" and "if" in <<elseif>> clause'.concat(i>0?" (#".concat(i,")"):"")):this.error("<<else>> does not accept a conditional expression (perhaps you meant to use <<elseif>>), invalid: ".concat(this.payload[i].args.raw));if(i+1!==len)return this.error("<<else>> must be the final clause")}else{if(0===this.payload[i].args.full.length)return this.error("no conditional expression specified for <<".concat(this.payload[i].name,">> clause").concat(i>0?" (#".concat(i,")"):""));if((Config.debug||Config.enableOptionalDebugging)&&isAssignRE.test(this.payload[i].args.full.replace(isLiteralRE,"")))return this.error("assignment operator found within <<".concat(this.payload[i].name,">> clause").concat(i>0?" (#".concat(i,")"):""," (perhaps you meant to use an equality operator: ==, ===, eq, is), invalid: ").concat(this.payload[i].args.raw))}var evalJavaScript=Scripting.evalJavaScript,success=!1;for(i=0;i<len;++i){if(Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1}),"else"===this.payload[i].name||evalJavaScript(this.payload[i].args.full)){success=!0,new Wikifier(this.output,this.payload[i].contents);break}Config.debug&&this.debugView.modes({hidden:!0,invalid:!0})}if(Config.debug){for(++i;i<len;++i)this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0,invalid:!0});this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!success,invalid:!success})}}catch(ex){return this.error("bad conditional expression in <<".concat(0===i?"if":"elseif",">> clause").concat(i>0?" (#".concat(i,")"):"",": ").concat(getErrorMessage(ex)))}}}),Macro.add("include",{handler:function(){return"display"===this.name&&console.warn("[DEPRECATED] <<".concat(this.name,">> macro is deprecated.")),0===this.args.length?this.error("no passage specified"):(passage="object"===_typeof(this.args[0])?this.args[0].link:this.args[0],Story.has(passage)?(Config.debug&&this.debugView.modes({block:!0}),passage=Story.get(passage),void(this.args[1]?jQuery(document.createElement(this.args[1])).addClass("".concat(passage.id," macro-").concat(this.name)).attr("data-passage",passage.name).appendTo(this.output):jQuery(this.output)).wiki(passage.processText())):this.error('passage "'.concat(passage,'" does not exist')));var passage}}),Macro.add(["linkappend","linkprepend","linkreplace"],{isAsync:!0,tags:null,t8nRe:/^(?:transition|t8n)$/,handler:function(){var _this16=this;if(0===this.args.length)return this.error("no link text specified");var $link=jQuery(document.createElement("a")),$insert=jQuery(document.createElement("span")),transition=this.args.length>1&&this.self.t8nRe.test(this.args[1]);$link.wikiWithOptions({cleanup:!1,profile:"core"},this.args[0]).addClass("link-internal macro-".concat(this.name)).ariaClick({namespace:".macros",one:!0},this.shadowHandler((function(){if("linkreplace"===_this16.name?$link.remove():$link.wrap('<span class="macro-'.concat(_this16.name,'"></span>')).replaceWith((function(){return $link.html()})),""!==_this16.payload[0].contents){var frag=document.createDocumentFragment();new Wikifier(frag,_this16.payload[0].contents,{cleanup:!1}),$insert.append(frag)}transition&&setTimeout((function(){return $insert.removeClass("macro-".concat(_this16.name,"-in"))}),Engine.DOM_DELAY)}))).appendTo(this.output),$insert.addClass("macro-".concat(this.name,"-insert")),transition&&$insert.addClass("macro-".concat(this.name,"-in")),"linkprepend"===this.name?$insert.insertBefore($link):$insert.insertAfter($link)}}),Macro.add("nobr",{skipArgs:!0,tags:null,handler:function(){new Wikifier(this.output,this.payload[0].contents.replace(/^\n+|\n+$/g,"").replace(/\n+/g," "))}}),Macro.add(["numberbox","textbox"],{isAsync:!0,handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("default value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));Config.debug&&this.debugView.modes({block:!0});var asNumber="numberbox"===this.name,defaultValue=asNumber?Number(this.args[1]):this.args[1];if(asNumber&&Number.isNaN(defaultValue))return this.error('default value "'.concat(this.args[1],'" is neither a number nor can it be parsed into a number'));var passage,varId=createSlug(varName),el=document.createElement("input"),autofocus=!1;this.args.length>3?(passage=this.args[2],autofocus="autofocus"===this.args[3]):this.args.length>2&&("autofocus"===this.args[2]?autofocus=!0:passage=this.args[2]),"object"===_typeof(passage)&&(passage=passage.link),jQuery(el).attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),type:asNumber?"number":"text",inputmode:asNumber?"decimal":"text",tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.shadowHandler((function(){State.setVar(varName,asNumber?Number(this.value):this.value)}))).on("keypress.macros",this.shadowHandler((function(ev){13===ev.which&&(ev.preventDefault(),State.setVar(varName,asNumber?Number(this.value):this.value),null!=passage&&Engine.play(passage))}))).appendTo(this.output),asNumber&&(el.step="any"),State.setVar(varName,defaultValue),el.value=defaultValue,autofocus&&(el.setAttribute("autofocus","autofocus"),Engine.isPlaying()?jQuery(document).one(":passageend",(function(){setTimeout((function(){return el.focus()}),Engine.DOM_DELAY)})):setTimeout((function(){return el.focus()}),Engine.DOM_DELAY))}}),Macro.add(["print","=","-"],{skipArgs:!0,handler:function(){if(0===this.args.full.length)return this.error("no expression specified");try{var result=stringFrom(Scripting.evalJavaScript(this.args.full));null!==result&&new Wikifier(this.output,"-"===this.name?encodeEntities(result):result)}catch(ex){return this.error("bad evaluation: ".concat(getErrorMessage(ex)))}}}),Macro.add("radiobutton",{isAsync:!0,handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("checked value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));var varId=createSlug(varName),checkValue=this.args[1],el=document.createElement("input");switch(Object.hasOwn(TempState,this.name)||(TempState[this.name]={}),Object.hasOwn(TempState[this.name],varId)||(TempState[this.name][varId]=0),jQuery(el).attr({id:"".concat(this.name,"-").concat(varId,"-").concat(TempState[this.name][varId]++),name:"".concat(this.name,"-").concat(varId),type:"radio",tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.shadowHandler((function(){this.checked&&State.setVar(varName,checkValue)}))).appendTo(this.output),this.args[2]){case"autocheck":State.getVar(varName)===checkValue&&(el.checked=!0);break;case"checked":el.checked=!0,State.setVar(varName,checkValue)}}}),Macro.add("remove",{handler:function(){if(0===this.args.length)return this.error("no selector specified");var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));$targets.remove(),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("removeclass",{handler:function(){if(0===this.args.length)return this.error("no selector specified");var $targets=jQuery(this.args[0]);if(0===$targets.length)return this.error('no elements matched the selector "'.concat(this.args[0],'"'));this.args.length>1?$targets.removeClass(this.args[1].trim()):$targets.removeClass(),Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("repeat",{isAsync:!0,tags:null,timers:new Set,t8nRe:/^(?:transition|t8n)$/,handler:function(){var delay,_this17=this;if(0===this.args.length)return this.error("no time value specified");try{delay=Math.max(Engine.DOM_DELAY,cssTimeToMS(this.args[0]))}catch(ex){return this.error(ex.message)}Config.debug&&this.debugView.modes({block:!0});var transition=this.args.length>1&&this.self.t8nRe.test(this.args[1]),$wrapper=jQuery(document.createElement("span")).addClass("macro-".concat(this.name)).appendTo(this.output);this.self.registerInterval(this.shadowHandler((function(){var frag=document.createDocumentFragment();new Wikifier(frag,_this17.payload[0].contents,{cleanup:!1});var $output=$wrapper;transition&&($output=jQuery(document.createElement("span")).addClass("macro-repeat-insert macro-repeat-in").appendTo($output)),$output.append(frag),transition&&setTimeout((function(){return $output.removeClass("macro-repeat-in")}),Engine.DOM_DELAY)})),delay)},registerInterval:function(callback,delay){var _this18=this;if("function"!=typeof callback)throw new TypeError("callback parameter must be a function");var passage=State.passage,turn=State.turns,timers=this.timers,timerId=null;timerId=setInterval((function(){if(State.passage!==passage||State.turns!==turn)return clearInterval(timerId),void timers.delete(timerId);var timerIdCache;try{TempState.break=null,Object.hasOwn(TempState,"repeatTimerId")&&(timerIdCache=TempState.repeatTimerId),TempState.repeatTimerId=timerId,callback.call(_this18)}finally{void 0!==timerIdCache?TempState.repeatTimerId=timerIdCache:delete TempState.repeatTimerId,TempState.break=null}}),delay),timers.add(timerId),1===timers.size&&jQuery(document).one(":passageinit",(function(){timers.forEach((function(timerId){return clearInterval(timerId)})),timers.clear()}))}}),Macro.add("stop",{skipArgs:!0,handler:function(){if(!Object.hasOwn(TempState,"repeatTimerId"))return this.error("must only be used in conjunction with its parent macro <<repeat>>");var timers=Macro.get("repeat").timers,timerId=TempState.repeatTimerId;clearInterval(timerId),timers.delete(timerId),TempState.break=2,Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("script",{tags:null,handler:function(){var evalScript;switch(this.args.length>0?String(this.args[0]).toLowerCase():"javascript"){case"javascript":evalScript=Scripting.evalJavaScript;break;case"twinescript":evalScript=Scripting.evalTwineScript;break;default:return this.error('unknown language "'.concat(this.args[0],'"'))}var output=document.createDocumentFragment();try{evalScript(this.payload[0].contents,output)}catch(ex){return this.error("bad evaluation: ".concat(getErrorMessage(ex)))}Config.debug&&this.createDebugView(),output.hasChildNodes()&&this.output.appendChild(output)}}),Macro.add("set",{skipArgs:!0,handler:function(){if(0===this.args.full.length)return this.error("no expression specified");try{Scripting.evalJavaScript(this.args.full)}catch(ex){return this.error("bad evaluation: ".concat(getErrorMessage(ex)))}Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("run","set"),Macro.add("silent",{skipArgs:!0,tags:null,handler:function(){"silently"===this.name&&console.warn("[DEPRECATED] <<".concat(this.name,">> macro is deprecated."));var frag=document.createDocumentFragment();if(new Wikifier(frag,this.payload[0].contents.trim()),Config.debug)this.debugView.modes({block:!0,hidden:!0}),this.output.appendChild(frag);else{var errList=Array.from(frag.querySelectorAll(".error")).map((function(errEl){return errEl.textContent}));if(errList.length>0)return this.error("error".concat(1===errList.length?"":"s"," within contents (").concat(errList.join("; "),")"))}}}),Macro.add("switch",{skipArgs:["switch"],tags:["case","default"],handler:function(){if(0===this.args.full.length)return this.error("no expression specified");var i,result,len=this.payload.length;if(1===len)return this.error("no cases specified");for(i=1;i<len;++i)if("default"===this.payload[i].name){if(this.payload[i].args.length>0)return this.error("<<default>> does not accept values, invalid: ".concat(this.payload[i].args.raw));if(i+1!==len)return this.error("<<default>> must be the final case")}else if(0===this.payload[i].args.length)return this.error("no value(s) specified for <<".concat(this.payload[i].name,">> (#").concat(i,")"));try{result=Scripting.evalJavaScript(this.args.full)}catch(ex){return this.error("bad evaluation: ".concat(getErrorMessage(ex)))}var debugView=this.debugView,success=!1;for(Config.debug&&debugView.modes({nonvoid:!1,hidden:!0}),i=1;i<len;++i){if(Config.debug&&this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1}),"default"===this.payload[i].name||this.payload[i].args.some((function(val){return val===result}))){success=!0,new Wikifier(this.output,this.payload[i].contents);break}Config.debug&&this.debugView.modes({hidden:!0,invalid:!0})}if(Config.debug){for(++i;i<len;++i)this.createDebugView(this.payload[i].name,this.payload[i].source).modes({nonvoid:!1,hidden:!0,invalid:!0});debugView.modes({nonvoid:!1,hidden:!0,invalid:!success}),this.createDebugView("/".concat(this.name),"<</".concat(this.name,">>")).modes({nonvoid:!1,hidden:!0,invalid:!success})}}}),Macro.add("textarea",{isAsync:!0,handler:function(){if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("default value"),this.error("no ".concat(errors.join(" or ")," specified"))}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable name "'.concat(this.args[0],'" is missing its sigil ($ or _)'));Config.debug&&this.debugView.modes({block:!0});var varId=createSlug(varName),defaultValue=this.args[1],autofocus="autofocus"===this.args[2],el=document.createElement("textarea");jQuery(el).attr({id:"".concat(this.name,"-").concat(varId),name:"".concat(this.name,"-").concat(varId),rows:4,tabindex:0}).addClass("macro-".concat(this.name)).on("change.macros",this.shadowHandler((function(){State.setVar(varName,this.value)}))).appendTo(this.output),State.setVar(varName,defaultValue),el.textContent=defaultValue,autofocus&&(el.setAttribute("autofocus","autofocus"),Engine.isPlaying()?jQuery(document).one(":passageend",(function(){setTimeout((function(){return el.focus()}),Engine.DOM_DELAY)})):setTimeout((function(){return el.focus()}),Engine.DOM_DELAY))}}),Macro.add("timed",{isAsync:!0,tags:["next"],timers:new Set,t8nRe:/^(?:transition|t8n)$/,handler:function(){if(0===this.args.length)return this.error("no time value specified in <<timed>>");var i,items=[];try{items.push({name:this.name,source:this.source,delay:Math.max(Engine.DOM_DELAY,cssTimeToMS(this.args[0])),content:this.payload[0].contents})}catch(ex){return this.error("".concat(ex.message," in <<timed>>"))}if(this.payload.length>1)try{var len;for(i=1,len=this.payload.length;i<len;++i)items.push({name:this.payload[i].name,source:this.payload[i].source,delay:0===this.payload[i].args.length?items[items.length-1].delay:Math.max(Engine.DOM_DELAY,cssTimeToMS(this.payload[i].args[0])),content:this.payload[i].contents})}catch(ex){return this.error("".concat(ex.message," in <<next>> (#").concat(i,")"))}Config.debug&&this.debugView.modes({block:!0});var transition=this.args.length>1&&this.self.t8nRe.test(this.args[1]),$wrapper=jQuery(document.createElement("span")).addClass("macro-".concat(this.name)).appendTo(this.output);this.self.registerTimeout(this.shadowHandler((function(item){var frag=document.createDocumentFragment();new Wikifier(frag,item.content,{cleanup:!1});var $output=$wrapper;Config.debug&&"next"===item.name&&($output=jQuery(new DebugView($output[0],"macro",item.name,item.source).output)),transition&&($output=jQuery(document.createElement("span")).addClass("macro-timed-insert macro-timed-in").appendTo($output)),$output.append(frag),transition&&setTimeout((function(){return $output.removeClass("macro-timed-in")}),Engine.DOM_DELAY)})),items)},registerTimeout:function(callback,items){if("function"!=typeof callback)throw new TypeError("callback parameter must be a function");var passage=State.passage,turn=State.turns,timers=this.timers,timerId=null,nextItem=items.shift();timerId=setTimeout((function worker(){if(timers.delete(timerId),State.passage===passage&&State.turns===turn){var curItem=nextItem;null!=(nextItem=items.shift())&&(timerId=setTimeout(worker,nextItem.delay),timers.add(timerId)),callback.call(this,curItem)}}),nextItem.delay),timers.add(timerId),1===timers.size&&jQuery(document).one(":passageinit",(function(){timers.forEach((function(timerId){return clearTimeout(timerId)})),timers.clear()}))}}),Macro.add("type",{isAsync:!0,tags:null,typeId:0,handler:function(){if(0===this.args.length)return this.error("no speed specified");var cursor,speed=cssTimeToMS(this.args[0]);if(speed<0)return this.error("speed time value must be non-negative (received: ".concat(this.args[0],")"));for(var elClass="",elId="",elTag="div",skipKey=Config.macros.typeSkipKey,start=400,options=this.args.slice(1);options.length>0;){var option=options.shift();switch(option){case"class":if(0===options.length)return this.error("class option missing required class name(s)");if(""===(elClass=options.shift()))throw new Error('class option class name(s) must be non-empty (received: "")');break;case"element":if(0===options.length)return this.error("element option missing required element tag name");if(""===(elTag=options.shift()))throw new Error('element option tag name must be non-empty (received: "")');break;case"id":if(0===options.length)return this.error("id option missing required ID");if(""===(elId=options.shift()))throw new Error('id option ID must be non-empty (received: "")');break;case"keep":cursor="keep";break;case"none":cursor="none";break;case"skipkey":if(0===options.length)return this.error("skipkey option missing required key value");if(""===(skipKey=options.shift()))throw new Error('skipkey option key value must be non-empty (received: "")');break;case"start":if(0===options.length)return this.error("start option missing required time value");var value=options.shift();if((start=cssTimeToMS(value))<0)throw new Error("start option time value must be non-negative (received: ".concat(value,")"));break;default:return this.error("unknown option: ".concat(option))}}var contents=this.payload[0].contents;if(""!==contents.trim()){Config.debug&&this.debugView.modes({block:!0});var className="macro-".concat(this.name),namespace=".".concat(className),$target=jQuery(document.createElement(elTag)).addClass("".concat(className," ").concat(className,"-target")).appendTo(this.output);TempState.macroTypeQueue||(TempState.macroTypeQueue=[],$(document).off(namespace).one(":passageinit".concat(namespace),(function(){return $(document).off(namespace)})));var startTyping=0===TempState.macroTypeQueue.length,selfId=++this.self.typeId,allowCleanup=this.self.allowCleanup;TempState.macroTypeQueue.push({id:selfId,handler:this.shadowHandler((function(){var $wrapper=jQuery(document.createElement(elTag)).addClass(className);elId&&$wrapper.attr("id",elId),elClass&&$wrapper.addClass(elClass),new Wikifier($wrapper,contents,allowCleanup(elTag)?undefined:{cleanup:!1});var passage=State.passage,turn=State.turns;if(0===speed||!Config.macros.typeVisitedPassages&&State.passages.slice(0,-1).some((function(title){return title===passage}))||$wrapper.find(".error").length>0)return $target.replaceWith($wrapper),TempState.macroTypeQueue.shift(),void(TempState.macroTypeQueue.length>0&&TempState.macroTypeQueue.first().handler());var typer=new NodeTyper({targetNode:$wrapper.get(0),classNames:"none"===cursor?null:"".concat(className,"-cursor")});$target.replaceWith($wrapper);var keydownAndNS="keydown".concat(namespace),typingStopAndNS="".concat(":typingstop").concat(namespace);$(document).off(keydownAndNS).on(keydownAndNS,(function(ev){scrubEventKey(ev.key)!==skipKey||ev.target!==document.body&&ev.target!==document.documentElement||(ev.preventDefault(),$(document).off(keydownAndNS),typer.finish())})).one(typingStopAndNS,(function(){TempState.macroTypeQueue&&(0===TempState.macroTypeQueue.length?triggerEvent(":typingcomplete"):TempState.macroTypeQueue.first().handler())}));var typeNode=function(){var typeNodeMember=function(typeIntervalId){State.passage===passage&&State.turns===turn&&typer.type()||(typeIntervalId&&clearInterval(typeIntervalId),TempState.macroTypeQueue&&TempState.macroTypeQueue.length>0&&TempState.macroTypeQueue.first().id===selfId&&TempState.macroTypeQueue.shift(),triggerEvent(":typingstop",$wrapper),$wrapper.addClass("".concat(className,"-done")),"keep"===cursor&&$wrapper.addClass("".concat(className,"-cursor")))};triggerEvent(":typingstart",$wrapper),typeNodeMember();var typeNodeMemberId=setInterval((function(){return typeNodeMember(typeNodeMemberId)}),speed)};start?setTimeout(typeNode,start):typeNode()}))}),startTyping&&(Engine.isPlaying()?$(document).one(":passageend".concat(namespace),(function(){return TempState.macroTypeQueue.first().handler()})):TempState.macroTypeQueue.first().handler())}},allowCleanup:function(tagName){switch(tagName.toUpperCase()){case"ARTICLE":case"DIV":case"FOOTER":case"FORM":case"HEADER":case"MAIN":case"SECTION":return!0}return!1}}),Macro.add("unset",{skipArgs:!0,handler:function(){if(0===this.args.full.length)return this.error("no story/temporary variable list specified");try{var unsetExp=this.args.full.replace(/[,;\s]*((?:State\.(?:variables|temporary)|setup)\.)/g,(function(_,p1){return"; delete ".concat(p1)})).replace(/^; /,"");Scripting.evalJavaScript(unsetExp)}catch(ex){return this.error("bad evaluation: ".concat(getErrorMessage(ex)))}Config.debug&&this.debugView.modes({hidden:!0})}}),Macro.add("widget",{tags:null,handler:function(){if(0===this.args.length)return this.error("no widget name specified");var widgetCode,widgetName=this.args[0],isNonVoid=this.args.length>1&&"container"===this.args[1];if(Macro.has(widgetName))return this.error("cannot clobber existing ".concat(Macro.get(widgetName).isWidget?"widget":"macro",' "').concat(widgetName,'"'));try{var widgetDef={isWidget:!0,handler:(widgetCode=this.payload[0].contents,function(){var shadowStore={};Object.hasOwn(State.temporary,"args")&&(shadowStore._args=State.temporary.args),State.temporary.args=Array.from(this.args),State.temporary.args.raw=this.args.raw,State.temporary.args.full=this.args.full,State.temporary.args.name=this.name,this.addShadow("_args"),isNonVoid&&(Object.hasOwn(State.temporary,"contents")&&(shadowStore._contents=State.temporary.contents),State.temporary.contents=this.payload[0].contents,this.addShadow("_contents")),Object.hasOwn(State.variables,"args")&&(shadowStore.$args=State.variables.args),State.variables.args=State.temporary.args,this.addShadow("$args");try{var resFrag=document.createDocumentFragment(),errList=[];if(new Wikifier(resFrag,widgetCode),Array.from(resFrag.querySelectorAll(".error")).forEach((function(errEl){errList.push(errEl.textContent)})),0!==errList.length)return this.error("error".concat(errList.length>1?"s":""," within widget code (").concat(errList.join("; "),")"));this.output.appendChild(resFrag)}catch(ex){return this.error("cannot execute widget: ".concat(ex.message))}finally{Object.hasOwn(shadowStore,"_args")?State.temporary.args=shadowStore._args:delete State.temporary.args,isNonVoid&&(Object.hasOwn(shadowStore,"_contents")?State.temporary.contents=shadowStore._contents:delete State.temporary.contents),Object.hasOwn(shadowStore,"$args")?State.variables.args=shadowStore.$args:delete State.variables.args}})};isNonVoid&&(widgetDef.tags=[]),Macro.add(widgetName,widgetDef),Config.debug&&this.debugView.modes({hidden:!0})}catch(ex){return this.error('cannot create widget macro "'.concat(widgetName,'": ').concat(ex.message))}}}),Macro.add("silently","silent"),Macro.add("actions",{handler:function(){console.warn("[DEPRECATED] <<".concat(this.name,">> macro is deprecated."));for(var $list=jQuery(document.createElement("ul")).addClass(this.name).appendTo(this.output),i=0;i<this.args.length;++i){var passage=void 0,text=void 0,$image=void 0,setFn=void 0;if("object"===_typeof(this.args[i])?this.args[i].isImage?($image=jQuery(document.createElement("img")).attr("src",this.args[i].source),Object.hasOwn(this.args[i],"passage")&&$image.attr("data-passage",this.args[i].passage),Object.hasOwn(this.args[i],"title")&&$image.attr("title",this.args[i].title),Object.hasOwn(this.args[i],"align")&&$image.attr("align",this.args[i].align),passage=this.args[i].link,setFn=this.args[i].setFn):(text=this.args[i].text,passage=this.args[i].link,setFn=this.args[i].setFn):text=passage=this.args[i],!(Object.hasOwn(State.variables,"#actions")&&Object.hasOwn(State.variables["#actions"],passage)&&State.variables["#actions"][passage])){var $link=jQuery(Wikifier.createInternalLink(jQuery(document.createElement("li")).appendTo($list),passage,null,function(passage,fn){return function(){Object.hasOwn(State.variables,"#actions")||(State.variables["#actions"]={}),State.variables["#actions"][passage]=!0,"function"==typeof fn&&fn()}}(passage,setFn))).addClass("macro-".concat(this.name)).append($image||document.createTextNode(text));$image&&$link.addClass("link-image")}}}}),Macro.add("choice",{handler:function(){if(console.warn("[DEPRECATED] <<".concat(this.name,">> macro is deprecated.")),0===this.args.length)return this.error("no passage specified");var passage,text,$image,setFn,$link,choiceId=State.passage;if(1===this.args.length?"object"===_typeof(this.args[0])?this.args[0].isImage?($image=jQuery(document.createElement("img")).attr("src",this.args[0].source),Object.hasOwn(this.args[0],"passage")&&$image.attr("data-passage",this.args[0].passage),Object.hasOwn(this.args[0],"title")&&$image.attr("title",this.args[0].title),Object.hasOwn(this.args[0],"align")&&$image.attr("align",this.args[0].align),passage=this.args[0].link,setFn=this.args[0].setFn):(text=this.args[0].text,passage=this.args[0].link,setFn=this.args[0].setFn):text=passage=this.args[0]:(passage=this.args[0],text=this.args[1]),Object.hasOwn(State.variables,"#choice")&&Object.hasOwn(State.variables["#choice"],choiceId)&&State.variables["#choice"][choiceId])return $link=jQuery(document.createElement("span")).addClass("link-disabled macro-".concat(this.name)).attr("tabindex",-1).append($image||document.createTextNode(text)).appendTo(this.output),void($image&&$link.addClass("link-image"));$link=jQuery(Wikifier.createInternalLink(this.output,passage,null,(function(){Object.hasOwn(State.variables,"#choice")||(State.variables["#choice"]={}),State.variables["#choice"][choiceId]=!0,"function"==typeof setFn&&setFn()}))).addClass("macro-".concat(this.name)).append($image||document.createTextNode(text)),$image&&$link.addClass("link-image")}});var Dialog=function(){var DEFAULT_TOP=50,$overlay=null,$dialog=null,$title=null,$body=null,lastActive=null,observer=null,onCloseFn=null,scrollbarWidth=0;function calcInset(top){var $window=jQuery(window),inset={left:"",right:"",top:"",bottom:""};$dialog.css(inset);var horzSpace=$window.width()-$dialog.outerWidth(!0)-1,vertSpace=$window.height()-$dialog.outerHeight(!0)-1;if(horzSpace<=20+scrollbarWidth&&(vertSpace-=scrollbarWidth),vertSpace<=20+scrollbarWidth&&(horzSpace-=scrollbarWidth),inset.left=inset.right=horzSpace<=20?"10px":(horzSpace/2|0)+"px",vertSpace<=20)inset.top=inset.bottom="10px";else{var vertPos=vertSpace/2|0;inset.top=vertPos>top?top+"px":inset.bottom=vertPos+"px"}return inset}function onResize(top){"block"===$dialog.css("display")&&$dialog.css(calcInset(null!=top?top:DEFAULT_TOP))}function close(ev){if(triggerEvent(":dialogclosing",$body),jQuery(document).off(".dialog-close"),observer?(observer.disconnect(),observer=null):$body.off(".dialog-resize"),jQuery(window).off(".dialog-resize"),$dialog.removeClass("open").css({left:"",right:"",top:"",bottom:""}),jQuery("#ui-bar,#story").find("[tabindex=-2]").removeAttr("aria-hidden").attr("tabindex",0),jQuery("body>[tabindex=-3]").removeAttr("aria-hidden").removeAttr("tabindex"),$overlay.removeClass("open"),jQuery(document.documentElement).removeAttr("data-dialog"),$title.empty(),$body.empty().removeClass(),lastActive&&(lastActive.focus(),lastActive=null),onCloseFn)try{onCloseFn(ev)}finally{onCloseFn=null}return triggerEvent(":dialogclose",$body),triggerEvent(":dialogclosed",$body),Dialog}function create(title,classNames){return $title.empty().append((null!=title?String(title):"")||" "),$body.empty().removeClass(),null!=classNames&&$body.addClass(classNames),Dialog}function getBody(){return $body.get(0)}function isOpen(classNames){return $dialog.hasClass("open")&&(!classNames||classNames.splitOrEmpty(/\s+/).every((function(cn){return $body.hasClass(cn)})))}function wiki(){var _$body2;return(_$body2=$body).wiki.apply(_$body2,arguments),Dialog}return Object.preventExtensions(Object.create(null,{append:{value:function(){var _$body;return(_$body=$body).append.apply(_$body,arguments),Dialog}},body:{value:getBody},close:{value:close},create:{value:create},empty:{value:function(){return $body.empty(),Dialog}},init:{value:function(){if(!document.getElementById("ui-dialog")){scrollbarWidth=function(){var calcWidth;try{var inner=document.createElement("p");inner.style.width="100%",inner.style.height="200px";var outer=document.createElement("div");outer.style.position="absolute",outer.style.left="0",outer.style.top="0",outer.style.width="100px",outer.style.height="100px",outer.style.visibility="hidden",outer.style.overflow="hidden",outer.appendChild(inner),document.body.appendChild(outer);var w1=inner.offsetWidth;outer.style.overflow="auto";var w2=inner.offsetWidth;w1===w2&&(w2=outer.clientWidth),document.body.removeChild(outer),calcWidth=w1-w2}catch(ex){}return calcWidth||17}();var $elems=jQuery(document.createDocumentFragment()).append('<div id="ui-overlay" class="ui-close"></div><div id="ui-dialog" tabindex="0" role="dialog" aria-labelledby="ui-dialog-title" aria-modal="true"><div id="ui-dialog-titlebar"><h1 id="ui-dialog-title"></h1>'+'<button id="ui-dialog-close" class="ui-close" tabindex="0" aria-label="'.concat(L10n.get("textClose"),'"></button>')+'</div><div id="ui-dialog-body"></div></div>');$overlay=jQuery($elems.find("#ui-overlay").get(0)),$dialog=jQuery($elems.find("#ui-dialog").get(0)),$title=jQuery($elems.find("#ui-dialog-title").get(0)),$body=jQuery($elems.find("#ui-dialog-body").get(0)),$elems.insertBefore("body>script#script-sugarcube")}}},isOpen:{value:isOpen},open:{value:function(options,onClose){var top=Object.assign({top:DEFAULT_TOP},options).top;if(null!=onClose){var closeType=getTypeOf(onClose);if("function"!==closeType)throw new TypeError("Dialog.open onClose parameter must be a function (received: ".concat(closeType,")"));onCloseFn=onClose}else onCloseFn=null;triggerEvent(":dialogopening",$body),isOpen()||(lastActive=getActiveElement()),jQuery(document.documentElement).attr("data-dialog","open"),$overlay.addClass("open"),jQuery("body>:not(script,#store-area,tw-storydata,#ui-bar,#ui-overlay,#ui-dialog)").attr("tabindex",-3).attr("aria-hidden",!0),jQuery("#ui-bar,#story").find("[tabindex]:not([tabindex^=-])").attr("tabindex",-2).attr("aria-hidden",!0);var resizeHandler=jQuery.throttle(40,(function(){return onResize(top)}));return $body.imagesLoaded().always(resizeHandler),$dialog.css(calcInset(top)).addClass("open").focus(),jQuery(window).off(".dialog-resize").on("resize.dialog-resize",resizeHandler),Has.mutationObserver?(observer=new MutationObserver((function(mutations){for(var i=0;i<mutations.length;++i)if("childList"===mutations[i].type){$body.imagesLoaded().always(resizeHandler),resizeHandler();break}}))).observe(getBody(),{childList:!0,subtree:!0}):$body.off(".dialog-resize").on("DOMNodeInserted.dialog-resize DOMNodeRemoved.dialog-resize",(function(){$body.imagesLoaded().always(resizeHandler),resizeHandler()})),jQuery(document).off(".dialog-close").one("click.dialog-close",".ui-close",(function(ev){close(ev)})).one("keypress.dialog-close",".ui-close",(function(ev){13!==ev.which&&32!==ev.which||triggerEvent("click",this)})),triggerEvent(":dialogopen",$body),triggerEvent(":dialogopened",$body),Dialog}},resize:{value:function(options){return onResize("object"===_typeof(options)?options.top:undefined)}},wiki:{value:wiki},wikiPassage:{value:function(name){return wiki(Story.get(name).processText())}},setup:{value:function(title,classNames){return console.warn("[DEPRECATED] Dialog.setup() is deprecated."),create(title,classNames),getBody()}}}))}(),Engine=function(){var States=enumFrom({Init:"init",Idle:"idle",Playing:"playing",Rendering:"rendering"}),DOM_DELAY=40,_initDebugViews=[],_state=States.Init,_lastPlay=null;function engineGo(offset){var succeeded=State.go(offset);return succeeded&&engineShow(),succeeded}function engineShow(){return enginePlay(State.passage,!0)}function enginePlay(title,noHistory){if(_state===States.Init)return!1;var passageReadyOutput,passageDoneOutput,passageTitle=title;if(_state=States.Playing,TempState={},State.clearTemporary(),"function"==typeof Config.navigation.override)try{var overrideTitle=Config.navigation.override(passageTitle);overrideTitle&&(passageTitle=overrideTitle)}catch(ex){}var passage=Story.get(passageTitle);if(jQuery.event.trigger({passage:passage,type:":passageinit",detail:{passage:passage}}),Object.keys(prehistory).forEach((function(task){"function"==typeof prehistory[task]&&prehistory[task].call(passage,task)})),noHistory||State.create(passage.name),document.body.className&&(document.body.className=""),_lastPlay=now(),Object.keys(predisplay).forEach((function(task){"function"==typeof predisplay[task]&&predisplay[task].call(passage,task)})),Story.has("PassageReady"))try{passageReadyOutput=Wikifier.wikifyEval(Story.get("PassageReady").text)}catch(ex){console.error(ex),Alert.error("PassageReady",ex.message)}_state=States.Rendering;var dataTags=passage.tags.length>0?passage.tags.join(" "):null,passageEl=document.createElement("div");jQuery(passageEl).attr({id:passage.id,"data-passage":passage.name,"data-tags":dataTags}).addClass("passage passage-in ".concat(passage.className)),jQuery(document.body).attr("data-tags",dataTags).addClass(passage.className),jQuery(document.documentElement).attr("data-tags",dataTags),jQuery.event.trigger({content:passageEl,passage:passage,type:":passagestart",detail:{content:passageEl,passage:passage}}),Object.keys(prerender).forEach((function(task){"function"==typeof prerender[task]&&prerender[task].call(passage,passageEl,task)})),Story.has("PassageHeader")&&new Wikifier(passageEl,Story.get("PassageHeader").processText()),passageEl.appendChild(passage.render()),Story.has("PassageFooter")&&new Wikifier(passageEl,Story.get("PassageFooter").processText()),jQuery.event.trigger({content:passageEl,passage:passage,type:":passagerender",detail:{content:passageEl,passage:passage}}),Object.keys(postrender).forEach((function(task){"function"==typeof postrender[task]&&postrender[task].call(passage,passageEl,task)}));var debugView,containerEl=document.getElementById("passages");if(containerEl.hasChildNodes()&&("number"==typeof Config.passages.transitionOut||"string"==typeof Config.passages.transitionOut&&""!==Config.passages.transitionOut&&Has.transitionEndEvent?Array.from(containerEl.childNodes).forEach((function(outgoing){var $outgoing=jQuery(outgoing);if(outgoing.nodeType===Node.ELEMENT_NODE&&$outgoing.hasClass("passage")){if($outgoing.hasClass("passage-out"))return;$outgoing.attr({id:"out-".concat($outgoing.attr("id")),"aria-hidden":"true","aria-live":"off"}).addClass("passage-out"),"string"==typeof Config.passages.transitionOut?$outgoing.on(Has.transitionEndEvent,(function(ev){ev.originalEvent.propertyName===Config.passages.transitionOut&&$outgoing.remove()})):setTimeout((function(){return $outgoing.remove()}),Math.max(DOM_DELAY,Config.passages.transitionOut))}else $outgoing.remove()})):jQuery(containerEl).empty()),jQuery(passageEl).appendTo(containerEl),setTimeout((function(){return jQuery(passageEl).removeClass("passage-in")}),DOM_DELAY/2),window.scroll(0,0),_state=States.Playing,Story.has("PassageDone"))try{passageDoneOutput=Wikifier.wikifyEval(Story.get("PassageDone").text)}catch(ex){console.error(ex),Alert.error("PassageDone",ex.message)}(jQuery.event.trigger({content:passageEl,passage:passage,type:":passagedisplay",detail:{content:passageEl,passage:passage}}),Object.keys(postdisplay).forEach((function(task){"function"==typeof postdisplay[task]&&postdisplay[task].call(passage,task)})),UI.update(),Config.debug)&&(null!=passageReadyOutput&&((debugView=new DebugView(document.createDocumentFragment(),"special","PassageReady","PassageReady")).modes({hidden:!0}),debugView.append(passageReadyOutput),jQuery(passageEl).prepend(debugView.output)),null!=passageDoneOutput&&((debugView=new DebugView(document.createDocumentFragment(),"special","PassageDone","PassageDone")).modes({hidden:!0}),debugView.append(passageDoneOutput),jQuery(passageEl).append(debugView.output)),1===State.turns&&_initDebugViews.length>0&&jQuery(passageEl).prepend(_initDebugViews));return jQuery("#story").find("a,link,button,input,select,textarea").not("[tabindex]").attr("tabindex",0),State.turns>1&&Save.browser.auto.isEnabled()&&Save.browser.auto.save(),jQuery.event.trigger({content:passageEl,passage:passage,type:":passageend",detail:{content:passageEl,passage:passage}}),_state=States.Idle,_lastPlay=now(),passageEl}return Object.preventExtensions(Object.create(null,{States:{value:States},DOM_DELAY:{get:function(){return DOM_DELAY}},init:{value:function(){if(_state===States.Init){jQuery("#init-no-js,#init-lacking").remove();var $main=jQuery('<div id="story" role="main"></div>'),markup=Story.has("StoryInterface")&&Story.get("StoryInterface").text.trim();if(markup){if(Config.ui.updateStoryElements=!1,UIBar.destroy(),jQuery(document.head).find("#style-core-display").remove(),$main.append(markup),$main.find("#story").length>0)throw new Error('element with ID "story" found within "StoryInterface" special passage');var $passages=$main.find("#passages");if(0===$passages.length)throw new Error('no element with ID "passages" found within "StoryInterface" special passage');$passages.empty().not("[aria-live]").attr("aria-live","polite").end();var $dataInitPassages=$main.find("[data-init-passage]"),$dataPassages=$main.find("[data-passage]");$dataInitPassages.each((function(i,el){if("passages"===el.id)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' id="passages"> must not contain a "data-init-passage" content attribute'));var passage=el.getAttribute("data-init-passage").trim();if(el.hasAttribute("data-passage"))throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' data-init-passage="').concat(passage,'"> must not contain a "data-passage" content attribute'));if(null!==el.firstElementChild)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' data-init-passage="').concat(passage,'"> contains child elements'));Story.has(passage)&&jQuery(document).one(":uiupdate".concat(".engine"),(function(){var frag=document.createDocumentFragment();new Wikifier(frag,Story.get(passage).processText().trim()),jQuery(el).empty().append(frag)}))})),$dataPassages.each((function(i,el){if("passages"===el.id)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' id="passages"> must not contain a "data-passage" content attribute'));var passage=el.getAttribute("data-passage").trim();if(null!==el.firstElementChild)throw new Error('"StoryInterface" element <'.concat(el.nodeName.toLowerCase(),' data-passage="').concat(passage,'"> contains child elements'));Story.has(passage)&&jQuery(document).on(":uiupdate".concat(".engine"),(function(){var frag=document.createDocumentFragment();new Wikifier(frag,Story.get(passage).processText().trim()),jQuery(el).empty().append(frag)}))}))}else $main.append('<div id="passages" aria-live="polite"></div>');$main.insertBefore("body>script#script-sugarcube")}}},runUserScripts:{value:function(){var storyStyle;_state===States.Init&&(storyStyle=document.createElement("style"),new StyleWrapper(storyStyle).add(Story.getStyles().map((function(style){return style.text.trim()})).join("\n")),jQuery(storyStyle).appendTo(document.head).attr({id:"style-story",type:"text/css"}),Story.getScripts().forEach((function(script){try{Scripting.evalJavaScript(script.text)}catch(ex){console.error(ex),Alert.error(script.name,getErrorMessage(ex))}})),Story.getWidgets().forEach((function(widget){try{Wikifier.wikifyEval(widget.processText())}catch(ex){console.error(ex),Alert.error(widget.name,getErrorMessage(ex))}})))}},runUserInit:{value:function(){if(_state===States.Init&&(Story.getInits().forEach((function(passage){try{var debugBuffer=Wikifier.wikifyEval(passage.text);if(Config.debug){var debugView=new DebugView(document.createDocumentFragment(),"special","".concat(passage.name," [init-tagged]"),"".concat(passage.name," [init-tagged]"));debugView.modes({hidden:!0}),debugView.append(debugBuffer),_initDebugViews.push(debugView.output)}}catch(ex){console.error(ex),Alert.error("".concat(passage.name," [init-tagged]"),getErrorMessage(ex))}})),Story.has("StoryInit")))try{var debugBuffer=Wikifier.wikifyEval(Story.get("StoryInit").text);if(Config.debug){var debugView=new DebugView(document.createDocumentFragment(),"special","StoryInit","StoryInit");debugView.modes({hidden:!0}),debugView.append(debugBuffer),_initDebugViews.push(debugView.output)}}catch(ex){console.error(ex),Alert.error("StoryInit",getErrorMessage(ex))}}},start:{value:function(){if(_state===States.Init){if(null==Config.passages.start)throw new Error("starting passage not selected");if(!Story.has(Config.passages.start))throw new Error('starting passage ("'.concat(Config.passages.start,'") not found'));if(_state=States.Idle,document.documentElement.focus(),State.restore())engineShow();else{var autoloadType=_typeof(Config.saves._internal_autoload_);"string"===autoloadType?"prompt"===Config.saves._internal_autoload_&&(UI.buildAutoload(),Dialog.open()):new Promise((function(resolve,reject){if(Save.browser.size>0&&("boolean"===autoloadType&&Config.saves._internal_autoload_||"function"===autoloadType&&Config.saves._internal_autoload_()))return resolve();reject()})).then((function(){Save.browser.continue(),engineShow()})).catch((function(){enginePlay(Config.passages.start)}))}}}},restart:{value:function(){LoadScreen.show(),window.scroll(0,0),State.reset(),triggerEvent(":enginerestart"),window.location.reload()}},state:{get:function(){return _state}},isIdle:{value:function(){return _state===States.Idle}},isPlaying:{value:function(){return _state!==States.Idle}},isRendering:{value:function(){return _state===States.Rendering}},lastPlay:{get:function(){return _lastPlay}},goTo:{value:function(index){var succeeded=State.goTo(index);return succeeded&&engineShow(),succeeded}},go:{value:engineGo},backward:{value:function(){return engineGo(-1)}},forward:{value:function(){return engineGo(1)}},show:{value:engineShow},play:{value:enginePlay},display:{value:function(title,link,option){console.warn("[DEPRECATED] Engine.display() is deprecated.");var noHistory=!1;switch(option){case undefined:break;case"replace":case"back":noHistory=!0;break;default:throw new Error('Engine.display option parameter called with obsolete value "'.concat(option,'"; please notify the developer'))}enginePlay(title,noHistory)}},minDomActionDelay:{get:function(){return DOM_DELAY}}}))}(),Passage=(tagsToSkip=/^(?:debug|nobr|passage|widget|twine\..*)$/i,encodedRE=/\r/g,hasEncodedRE=new RegExp(encodedRE.source),decodePassageText=function(str){if(null==str)return"";var val=String(str);return val&&hasEncodedRE.test(val)?val.replace(encodedRE,""):val},function(){return _createClass((function Passage(name,el){var _this19=this;_classCallCheck(this,Passage),Object.defineProperties(this,{name:{value:decodeEntities(name)},element:{value:el||null},tags:{value:Object.freeze(el&&el.hasAttribute("tags")?Array.from(new Set(el.getAttribute("tags").trim().splitOrEmpty(/\s+/))):[])}}),Object.defineProperties(this,{id:{value:"passage-".concat(createSlug(this.name))},classes:{value:Object.freeze(0===this.tags.length?[]:_this19.tags.filter((function(tag){return!tagsToSkip.test(tag)})).map((function(tag){return createSlug(tag)})))},domId:{get:function(){return this.id}},title:{get:function(){return this.name}}})}),[{key:"className",get:function(){return this.classes.join(" ")}},{key:"text",get:function(){if(null==this.element){var passage=encodeMarkup(this.name),mesg="".concat(L10n.get("errorViewTitle"),": ").concat(L10n.get("errorNonexistentPassage",{passage:passage}));return'<div class="error-view"><span class="error">'.concat(mesg,"</span></div>")}return decodePassageText(this.element.textContent)}},{key:"processText",value:function(){if(null==this.element)return this.text;if(this.tags.includes("Twine.image"))return"[img[".concat(this.text,"]]");var processed=this.text;return Config.passages.onProcess&&(processed=Config.passages.onProcess.call(null,{title:this.name,tags:this.tags,text:processed})),(Config.passages.nobr||this.tags.includes("nobr"))&&(processed=processed.replace(/^\n+|\n+$/g,"").replace(/\n+/g," ")),processed}},{key:"render",value:function(options){var frag=document.createDocumentFragment();return new Wikifier(frag,this.processText(),options),frag}},{key:"description",value:function(){return"".concat(L10n.get("textTurn")," ").concat(State.turns)}}])}()),encodedRE,hasEncodedRE,tagsToSkip,decodePassageText,Save=function(){var Type=enumFrom({Unknown:0,Auto:1,Slot:2,Disk:3,Base64:4,Autosave:1,Serialize:4}),MAX_INDEX=15,INDEX_DELIMITER=":",AUTO_SUBKEY="".concat("save.","auto."),AUTO_DATA_SUBKEY="".concat(AUTO_SUBKEY,"data").concat(INDEX_DELIMITER),AUTO_INFO_SUBKEY="".concat(AUTO_SUBKEY,"info").concat(INDEX_DELIMITER),SLOT_SUBKEY="".concat("save.","slot."),SLOT_DATA_SUBKEY="".concat(SLOT_SUBKEY,"data").concat(INDEX_DELIMITER),SLOT_INFO_SUBKEY="".concat(SLOT_SUBKEY,"info").concat(INDEX_DELIMITER),onLoadHandlers=new Set,onSaveHandlers=new Set;function createDetails(saveType,description,metadata){var metadataType=_typeof(metadata);if("object"!==metadataType&&"undefined"!==metadataType)throw new TypeError("metadata parameter must be an object or null/undefined");var cfgMetadata=Config.saves.metadata?Config.saves.metadata(saveType):undefined,cfgMetadataType=_typeof(cfgMetadata);if("object"!==cfgMetadataType&&"undefined"!==cfgMetadataType)throw new TypeError("Config.saves.metadata function must return an object or null/undefined");var desc,details={type:saveType};null!=description&&(desc=String(description).trim()),desc||"function"!=typeof Config.saves.descriptions||"string"==typeof(desc=Config.saves.descriptions(saveType))&&(desc=desc.trim()),details.desc=desc||"".concat(L10n.get("textTurn")," ").concat(State.turns);var fullMetadata=Object.assign({},cfgMetadata,metadata);return Object.keys(fullMetadata).length>0&&(details.metadata=fullMetadata),details}function findNewest(saveType){var keys;switch(saveType){case Type.Auto:keys=getKeys(isAutoInfoKey);break;case Type.Slot:keys=getKeys(isSlotInfoKey);break;default:keys=getKeys(isInfoKey)}switch(keys.length){case 0:return{index:-1};case 1:return{index:getIndexFromKey(keys[0]),type:getTypeFromKey(keys[0])}}return keys.map((function(key){return{value:{index:getIndexFromKey(key),type:getTypeFromKey(key)},date:storage.get(key).date}})).sort((function(a,b){return b.date-a.date})).first().value}function getIndexFromKey(key){var pos=key.lastIndexOf(INDEX_DELIMITER);if(-1===pos)throw new Error("unable to get index from save key (received: ".concat(key,")"));return Number(key.slice(pos+1))}function getAutoInfoKeyFromIndex(index){return"".concat(AUTO_INFO_SUBKEY).concat(index)}function getAutoDataKeyFromIndex(index){return"".concat(AUTO_DATA_SUBKEY).concat(index)}function getSlotInfoKeyFromIndex(index){return"".concat(SLOT_INFO_SUBKEY).concat(index)}function getSlotDataKeyFromIndex(index){return"".concat(SLOT_DATA_SUBKEY).concat(index)}function getKeys(predicate){return storage.keys().filter(predicate)}function getTypeFromKey(key){return isAutoKey(key)?Type.Auto:Type.Slot}function isInfoKey(key){return key.startsWith(AUTO_INFO_SUBKEY)||key.startsWith(SLOT_INFO_SUBKEY)}function isAutoKey(key){return key.startsWith(AUTO_SUBKEY)}function isAutoInfoKey(key){return key.startsWith(AUTO_INFO_SUBKEY)}function isSlotKey(key){return key.startsWith(SLOT_SUBKEY)}function isSlotInfoKey(key){return key.startsWith(SLOT_INFO_SUBKEY)}function saveBlobToDiskAs(data,filename,extension){if("string"!=typeof filename)throw new Error("filename parameter must be a string");var baseName=createFilename(filename);if(""===baseName)throw new Error("filename parameter must not consist solely of illegal characters");var datestamp=function(date){if(!(date instanceof Date))throw new TypeError("createDatestamp date parameter must be a Date object");var MM=date.getMonth()+1,DD=date.getDate(),hh=date.getHours(),mm=date.getMinutes(),ss=date.getSeconds();return MM<10&&(MM="0".concat(MM)),DD<10&&(DD="0".concat(DD)),hh<10&&(hh="0".concat(hh)),mm<10&&(mm="0".concat(mm)),ss<10&&(ss="0".concat(ss)),"".concat(date.getFullYear()).concat(MM).concat(DD,"-").concat(hh).concat(mm).concat(ss)}(new Date),fileExt=createFilename(extension)||"save";saveAs(new Blob([data],{type:"text/plain;charset=UTF-8"}),"".concat(baseName,"-").concat(datestamp,".").concat(fileExt))}function saveToBrowserStorage(saveData){var data=saveData.data,dataKey=saveData.dataKey,info=saveData.info,infoKey=saveData.infoKey;try{storage.set(dataKey,data)&&(storage.set(infoKey,info)||storage.delete(dataKey))}catch(ex){throw storage.delete(dataKey),storage.delete(infoKey),ex}}function browserClear(){return autoClear(),slotClear(),!0}function browserIsEnabled(){return autoIsEnabled()||slotIsEnabled()}function autoClear(){return getKeys(isAutoKey).forEach((function(key){return storage.delete(key)})),!0}function autoDelete(index){if(!Number.isInteger(index))throw new TypeError("auto save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("auto save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));return storage.delete(getAutoInfoKeyFromIndex(index)),storage.delete(getAutoDataKeyFromIndex(index)),!0}function autoGet(index){if(!Number.isInteger(index))throw new TypeError("auto save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("auto save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));return storage.get(getAutoInfoKeyFromIndex(index))}function autoHas(index){if(!Number.isInteger(index))throw new TypeError("auto save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("auto save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));return storage.has(getAutoInfoKeyFromIndex(index))}function autoIsEnabled(){return"cookie"!==storage.name&&Config.saves.maxAutoSaves>0}function autoLoad(index){return new Promise((function(resolve){if(!Number.isInteger(index))throw new TypeError("auto save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("auto save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));if(Engine.state===Engine.States.Init)throw new Error(L10n.get("saveErrorLoadTooEarly"));var info=storage.get(getAutoInfoKeyFromIndex(index)),data=storage.get(getAutoDataKeyFromIndex(index));if(!info||!data)throw new Error(L10n.get("saveErrorNonexistent"));unmarshal(Object.assign(info,data)),resolve(!0)}))}function autoSave(desc,metadata){if(!autoIsEnabled()||"function"==typeof Config.saves.isAllowed&&!Config.saves.isAllowed(Type.Auto))return!1;var index=(findNewest(Type.Auto).index+1)%Config.saves.maxAutoSaves,infoKey=getAutoInfoKeyFromIndex(index),dataKey=getAutoDataKeyFromIndex(index),_splitSave3=splitSave(marshal(createDetails(Type.Auto,desc,metadata))),info=_splitSave3.info;saveToBrowserStorage({data:_splitSave3.data,dataKey:dataKey,info:info,infoKey:infoKey})}function slotClear(){return getKeys(isSlotKey).forEach((function(key){return storage.delete(key)})),!0}function slotDelete(index){if(!Number.isInteger(index))throw new TypeError("slot save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("slot save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));return storage.delete(getSlotInfoKeyFromIndex(index)),storage.delete(getSlotDataKeyFromIndex(index)),!0}function slotGet(index){if(!Number.isInteger(index))throw new TypeError("slot save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("slot save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));return storage.get(getSlotInfoKeyFromIndex(index))}function slotHas(index){if(!Number.isInteger(index))throw new TypeError("slot save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("slot save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));return storage.has(getSlotInfoKeyFromIndex(index))}function slotIsEnabled(){return"cookie"!==storage.name&&Config.saves.maxSlotSaves>0}function slotLoad(index){return new Promise((function(resolve){if(!Number.isInteger(index))throw new TypeError("slot save index must be an integer");if(index<0||index>MAX_INDEX)throw new RangeError("slot save index out of bounds (range: 0–".concat(MAX_INDEX,"; received: ").concat(index,")"));if(Engine.state===Engine.States.Init)throw new Error(L10n.get("saveErrorLoadTooEarly"));var info=storage.get(getSlotInfoKeyFromIndex(index)),data=storage.get(getSlotDataKeyFromIndex(index));if(!info||!data)throw new Error(L10n.get("saveErrorNonexistent"));unmarshal(Object.assign(info,data)),resolve(!0)}))}function slotSave(index,desc,metadata){if(!Number.isInteger(index))throw new TypeError("slot save index must be an integer");if(index<0||index>=Config.saves.maxSlotSaves)throw new RangeError("slot save index out of bounds (range: 0–".concat(Config.saves.maxSlotSaves-1,"; received: ").concat(index,")"));if(!slotIsEnabled()||"function"==typeof Config.saves.isAllowed&&!Config.saves.isAllowed(Type.Slot))throw new Error(L10n.get("saveErrorDisallowed"));var infoKey=getSlotInfoKeyFromIndex(index),dataKey=getSlotDataKeyFromIndex(index),_splitSave4=splitSave(marshal(createDetails(Type.Slot,desc,metadata))),info=_splitSave4.info;saveToBrowserStorage({data:_splitSave4.data,dataKey:dataKey,info:info,infoKey:infoKey})}function slotSize(){return getKeys(isSlotInfoKey).length}function diskLoad(event){return new Promise((function(resolve,reject){var reader=new FileReader;jQuery(reader).on("loadend",(function(){try{if(Engine.state===Engine.States.Init)throw new Error(L10n.get("saveErrorLoadTooEarly"));if(reader.error)throw new Error("".concat(L10n.get("saveErrorDiskLoadFail"),": ").concat(reader.error));var save;try{save=Serial.parse(LZString.decompressFromBase64(reader.result))}catch(ex){throw new Error(L10n.get("saveErrorDecodeFail"))}unmarshal(save),resolve(save.metadata)}catch(ex){reject(ex)}})),reader.readAsText(event.target.files[0])}))}function diskSave(filename,metadata){if(null==filename)throw new Error("Save.disk.save filename parameter is required");if("function"==typeof Config.saves.isAllowed&&!Config.saves.isAllowed(Type.Disk))throw new Error(L10n.get("saveErrorDisallowed"));var details=createDetails(Type.Disk,filename,metadata);saveBlobToDiskAs(LZString.compressToBase64(Serial.stringify(marshal(details))),filename,"save")}function base64Load(base64){return new Promise((function(resolve){if(Engine.state===Engine.States.Init)throw new Error(L10n.get("saveErrorLoadTooEarly"));var save;try{save=Serial.parse(LZString.decompressFromBase64(base64))}catch(ex){throw new Error(L10n.get("saveErrorDecodeFail"))}unmarshal(save),resolve(save.metadata)}))}function base64Save(metadata){if("function"==typeof Config.saves.isAllowed&&!Config.saves.isAllowed(Type.Base64))throw new Error(L10n.get("saveErrorDisallowed"));var details=createDetails(Type.Base64,null,metadata);return LZString.compressToBase64(Serial.stringify(marshal(details)))}function marshal(details){var save=Object.assign({},details,{date:Date.now(),id:Config.saves.id,state:State.marshalForSave()});return null!=Config.saves.version&&(save.version=Config.saves.version),onSaveHandlers.forEach((function(fn){return fn(save,function(save){switch(save.type){case Type.Auto:return{type:"autosave"};case Type.Slot:return{type:"slot"};case Type.Disk:return{type:"disk"};case Type.Base64:return{type:"serialize"}}throw new Error("save.type must be an integer (received: ".concat(_typeof(save.type),")"))}(save))})),save.state.delta=State.deltaEncode(save.state.history),delete save.state.history,save}function splitSave(save){var state=save.state;return{info:_objectWithoutProperties(save,_excluded3),data:{state:state}}}function unmarshal(save){if(null==save||"object"!==_typeof(save)||!Object.hasOwn(save,"id")||!Object.hasOwn(save,"state")||"object"!==_typeof(save.state)||!Object.hasOwn(save.state,"delta"))throw new Error(L10n.get("saveErrorInvalidData"));if(save.id!==Config.saves.id)throw new Error(L10n.get("saveErrorIdMismatch"));if(save.state.history=State.deltaDecode(save.state.delta),delete save.state.delta,"string"==typeof save.type){switch(save.type){case"auto":case"autosave":save.type=Type.Auto;break;case"slot":save.type=Type.Slot;break;case"disk":save.type=Type.Disk;break;case"base64":case"serialize":save.type=Type.Base64}if("number"!=typeof save.type)throw new Error("save.type is unknown")}onLoadHandlers.forEach((function(fn){return fn(save)})),State.unmarshalForSave(save.state)}return Object.preventExtensions(Object.create(null,{Type:{value:Type},MAX_INDEX:{get:function(){return MAX_INDEX}},init:{value:function(){return function(){var oldSaves=storage.get("saves");if(null===oldSaves)return;if(autoClear(),slotClear(),oldSaves.autosave){var _splitSave=splitSave(oldSaves.autosave),info=_splitSave.info,data=_splitSave.data;info.desc=info.title,delete info.title,info.type=Type.Auto;var infoKey=getAutoInfoKeyFromIndex(0),dataKey=getAutoDataKeyFromIndex(0);storage.set(dataKey,data)&&(storage.set(infoKey,info)||storage.delete(dataKey))}oldSaves.slots.forEach((function(save,index){if(save){var _splitSave2=splitSave(save),info=_splitSave2.info,data=_splitSave2.data;info.desc=info.title,delete info.title,info.type=Type.Slot;var infoKey=getSlotInfoKeyFromIndex(index),dataKey=getSlotDataKeyFromIndex(index);storage.set(dataKey,data)&&(storage.set(infoKey,info)||storage.delete(dataKey))}})),storage.delete("saves")}(),!0}},browser:{value:Object.preventExtensions(Object.create(null,{clear:{value:browserClear},continue:{value:function(){var newest=findNewest();return-1===newest.index?Promise.reject(new Error(L10n.get("saveErrorNonexistent"))):newest.type===Type.Auto?autoLoad(newest.index):slotLoad(newest.index)}},isEnabled:{value:browserIsEnabled},size:{get:function(){return getKeys(isInfoKey).length}},auto:{value:Object.preventExtensions(Object.create(null,{clear:{value:autoClear},delete:{value:autoDelete},entries:{value:function(){return getKeys(isAutoInfoKey).map((function(key){return{index:getIndexFromKey(key),info:storage.get(key)}})).sort((function(a,b){return b.info.date-a.info.date}))}},get:{value:autoGet},has:{value:autoHas},isEnabled:{value:autoIsEnabled},load:{value:autoLoad},save:{value:autoSave},size:{get:function(){return getKeys(isAutoInfoKey).length}}}))},slot:{value:Object.preventExtensions(Object.create(null,{clear:{value:slotClear},delete:{value:slotDelete},entries:{value:function(){return getKeys(isSlotInfoKey).map((function(key){return{index:getIndexFromKey(key),info:storage.get(key)}})).sort((function(a,b){return a.index-b.index}))}},get:{value:slotGet},has:{value:slotHas},isEnabled:{value:slotIsEnabled},load:{value:slotLoad},save:{value:slotSave},size:{get:slotSize}}))}}))},disk:{value:Object.preventExtensions(Object.create(null,{export:{value:function(filename){if(null==filename)throw new Error("Save.browser.export filename parameter is required");var auto=getKeys(isAutoInfoKey).map((function(infoKey){var index=getIndexFromKey(infoKey),info=storage.get(infoKey),data=storage.get(getAutoDataKeyFromIndex(index));if(!info||!data)throw new Error("during saves export auto save info or data nonexistent");return{index:index,info:info,data:data}})),slot=getKeys(isSlotInfoKey).map((function(infoKey){var index=getIndexFromKey(infoKey),info=storage.get(infoKey),data=storage.get(getSlotDataKeyFromIndex(index));if(!info||!data)throw new Error("during saves export slot save info or data nonexistent");return{index:index,info:info,data:data}}));saveBlobToDiskAs(LZString.compressToBase64(Serial.stringify({auto:auto,slot:slot})),filename,"savesbundle")}},import:{value:function(event){return new Promise((function(resolve,reject){var reader=new FileReader;jQuery(reader).on("loadend",(function(){try{if(reader.error)throw new Error("".concat(L10n.get("saveErrorDiskLoadFail"),": ").concat(reader.error));var bundle,badSave=function(O){return!Object.hasOwn(O,"index")||!Object.hasOwn(O,"info")||!Object.hasOwn(O,"data")};try{bundle=Serial.parse(LZString.decompressFromBase64(reader.result))}catch(ex){throw new Error(L10n.get("saveErrorDecodeFail"))}if(null==bundle||"object"!==_typeof(bundle)||!Object.hasOwn(bundle,"auto")||!(bundle.auto instanceof Array)||bundle.auto.some(badSave)||!Object.hasOwn(bundle,"slot")||!(bundle.slot instanceof Array)||bundle.slot.some(badSave))throw new Error(L10n.get("saveErrorInvalidData"));autoClear(),slotClear(),bundle.auto.forEach((function(save){return saveToBrowserStorage({data:save.data,dataKey:getAutoDataKeyFromIndex(save.index),info:save.info,infoKey:getAutoInfoKeyFromIndex(save.index)})})),bundle.slot.forEach((function(save){return saveToBrowserStorage({data:save.data,dataKey:getSlotDataKeyFromIndex(save.index),info:save.info,infoKey:getSlotInfoKeyFromIndex(save.index)})})),resolve(!0)}catch(ex){reject(ex)}})),reader.readAsText(event.target.files[0])}))}},load:{value:diskLoad},save:{value:diskSave}}))},base64:{value:Object.preventExtensions(Object.create(null,{export:{value:function(){var auto=getKeys(isAutoInfoKey).map((function(infoKey){var index=getIndexFromKey(infoKey),info=storage.get(infoKey),data=storage.get(getAutoDataKeyFromIndex(index));if(!info||!data)throw new Error("during saves export auto save info or data nonexistent");return{index:index,info:info,data:data}})),slot=getKeys(isSlotInfoKey).map((function(infoKey){var index=getIndexFromKey(infoKey),info=storage.get(infoKey),data=storage.get(getSlotDataKeyFromIndex(index));if(!info||!data)throw new Error("during saves export slot save info or data nonexistent");return{index:index,info:info,data:data}}));return LZString.compressToBase64(Serial.stringify({auto:auto,slot:slot}))}},import:{value:function(base64){return new Promise((function(resolve){var bundle,badSave=function(O){return!Object.hasOwn(O,"index")||!Object.hasOwn(O,"info")||!Object.hasOwn(O,"data")};try{bundle=Serial.parse(LZString.decompressFromBase64(base64))}catch(ex){throw new Error(L10n.get("saveErrorDecodeFail"))}if(null==bundle||"object"!==_typeof(bundle)||!Object.hasOwn(bundle,"auto")||!(bundle.auto instanceof Array)||bundle.auto.some(badSave)||!Object.hasOwn(bundle,"slot")||!(bundle.slot instanceof Array)||bundle.slot.some(badSave))throw new Error(L10n.get("saveErrorInvalidData"));autoClear(),slotClear(),bundle.auto.forEach((function(save){return saveToBrowserStorage({data:save.data,dataKey:getAutoDataKeyFromIndex(save.index),info:save.info,infoKey:getAutoInfoKeyFromIndex(save.index)})})),bundle.slot.forEach((function(save){return saveToBrowserStorage({data:save.data,dataKey:getSlotDataKeyFromIndex(save.index),info:save.info,infoKey:getSlotInfoKeyFromIndex(save.index)})})),resolve(!0)}))}},load:{value:base64Load},save:{value:base64Save}}))},onLoad:{value:Object.preventExtensions(Object.create(null,{add:{value:function(handler){var valueType=getTypeOf(handler);if("function"!==valueType)throw new TypeError("Save.onLoad.add handler parameter must be a function (received: ".concat(valueType,")"));onLoadHandlers.add(handler)}},clear:{value:function(){onLoadHandlers.clear()}},delete:{value:function(handler){return onLoadHandlers.delete(handler)}},size:{get:function(){return onLoadHandlers.size}}}))},onSave:{value:Object.preventExtensions(Object.create(null,{add:{value:function(handler){var valueType=getTypeOf(handler);if("function"!==valueType)throw new TypeError("Save.onSave.add handler parameter must be a function (received: ".concat(valueType,")"));onSaveHandlers.add(handler)}},clear:{value:function(){onSaveHandlers.clear()}},delete:{value:function(handler){return onSaveHandlers.delete(handler)}},size:{get:function(){return onSaveHandlers.size}}}))},get:{value:function(){throw new Error("[REMOVED] Save.get() has been removed.")}},clear:{value:function(){return console.warn("[DEPRECATED] Save.clear() is deprecated."),browserClear()}},ok:{value:function(){return console.warn("[DEPRECATED] Save.ok() is deprecated."),browserIsEnabled()}},autosave:{value:Object.preventExtensions(Object.create(null,{ok:{value:function(){return console.warn("[DEPRECATED] Save.autosave.ok() is deprecated."),autoIsEnabled()}},has:{value:function(){return console.warn("[DEPRECATED] Save.autosave.has() is deprecated."),autoHas(0)}},get:{value:function(){return console.warn("[DEPRECATED] Save.autosave.get() is deprecated."),autoGet(0)}},load:{value:function(){return console.warn("[DEPRECATED] Save.autosave.load() is deprecated."),autoLoad(0)}},save:{value:function(){return console.warn("[DEPRECATED] Save.autosave.save() is deprecated."),autoSave.apply(void 0,arguments)}},delete:{value:function(){return console.warn("[DEPRECATED] Save.autosave.delete() is deprecated."),autoDelete(0)}}}))},slots:{value:Object.preventExtensions(Object.create(null,{ok:{value:function(){return console.warn("[DEPRECATED] Save.slots.ok() is deprecated."),slotIsEnabled()}},length:{get:function(){return console.warn("[DEPRECATED] Save.slots.length is deprecated."),Config.saves.maxSlotSaves}},isEmpty:{value:function(){return console.warn("[DEPRECATED] Save.slots.isEmpty() is deprecated."),0===slotSize()}},count:{value:function(){return console.warn("[DEPRECATED] Save.slots.count() is deprecated."),slotSize()}},has:{value:function(){return console.warn("[DEPRECATED] Save.slots.has() is deprecated."),slotHas.apply(void 0,arguments)}},get:{value:function(){return console.warn("[DEPRECATED] Save.slots.get() is deprecated."),slotGet.apply(void 0,arguments)}},load:{value:function(){return console.warn("[DEPRECATED] Save.slots.load() is deprecated."),slotLoad.apply(void 0,arguments)}},save:{value:function(){return console.warn("[DEPRECATED] Save.slots.save() is deprecated."),slotSave.apply(void 0,arguments)}},delete:{value:function(){return console.warn("[DEPRECATED] Save.slots.delete() is deprecated."),slotDelete.apply(void 0,arguments)}}}))},export:{value:function(){return console.warn("[DEPRECATED] Save.export() is deprecated."),diskSave.apply(void 0,arguments)}},import:{value:function(){return console.warn("[DEPRECATED] Save.import() is deprecated."),diskLoad.apply(void 0,arguments)}},serialize:{value:function(){return console.warn("[DEPRECATED] Save.serialize() is deprecated."),base64Save.apply(void 0,arguments)}},deserialize:{value:function(){return console.warn("[DEPRECATED] Save.deserialize() is deprecated."),base64Load.apply(void 0,arguments)}}}))}(),Setting=function(){var Types=enumFrom({Header:0,Toggle:1,List:2,Range:3,Value:4}),_definitions=[];function updateSettingsObject(value){window.SugarCube.settings=settings=value}function createResultObject(def){var result={name:def.name,value:settings[def.name],default:def.default};return Object.hasOwn(def,"list")&&(result.list=def.list),Object.hasOwn(def,"min")&&(result.min=def.min),Object.hasOwn(def,"max")&&(result.max=def.max),Object.hasOwn(def,"step")&&(result.step=def.step),result}function clear(){return updateSettingsObject(create()),storage.delete("settings"),!0}function create(){return Object.create(null)}function load(){var defaultSettings=create(),loadedSettings=storage.get("settings")||create();_definitions.filter((function(def){return def.type!==Types.Header})).forEach((function(def){return defaultSettings[def.name]=def.default})),updateSettingsObject(Object.assign(defaultSettings,loadedSettings))}function save(){var savedSettings=create();return Object.keys(settings).length>0&&_definitions.filter((function(def){return def.type!==Types.Header&&settings[def.name]!==def.default})).forEach((function(def){return savedSettings[def.name]=settings[def.name]})),0===Object.keys(savedSettings).length?(storage.delete("settings"),!0):storage.set("settings",savedSettings)}function add(type,name,def){if(arguments.length<2){var errors=[];throw arguments.length<1&&errors.push("type"),arguments.length<2&&errors.push("name"),new Error("missing parameters, no ".concat(errors.join(" or ")," specified"))}if(null==def)def={};else if("object"!==_typeof(def))throw new TypeError("definition parameter must be an object");if(has(name))throw new Error('cannot clobber existing setting "'.concat(name,'"'));var str,pos,definition={type:type,name:name};if(type!==Types.Value&&(definition.label="string"==typeof def.label?def.label.trim():""),"string"==typeof def.desc){var desc=def.desc.trim();""!==desc&&(definition.desc=desc)}switch(type){case Types.Header:break;case Types.List:if(!Object.hasOwn(def,"list"))throw new Error("no list specified");if(!Array.isArray(def.list))throw new TypeError("list must be an array");if(0===def.list.length)throw new Error("list must not be empty");if(definition.list=Object.freeze(def.list),null==def.default)definition.default=def.list[0];else{var defaultIndex=def.list.indexOf(def.default);if(-1===defaultIndex)throw new Error("list does not contain default");definition.default=def.list[defaultIndex]}break;case Types.Range:if(!Object.hasOwn(def,"min"))throw new Error("no min specified");if("number"!=typeof def.min||Number.isNaN(def.min)||!Number.isFinite(def.min))throw new TypeError("min must be a finite number");if(!Object.hasOwn(def,"max"))throw new Error("no max specified");if("number"!=typeof def.max||Number.isNaN(def.max)||!Number.isFinite(def.max))throw new TypeError("max must be a finite number");if(!Object.hasOwn(def,"step"))throw new Error("no step specified");if("number"!=typeof def.step||Number.isNaN(def.step)||!Number.isFinite(def.step)||def.step<=0)throw new TypeError("step must be a finite number greater than zero");var fracDigits=(str=String(def.step),-1===(pos=str.lastIndexOf("."))?0:str.length-pos-1);if(function(value){if(fracDigits>0){var ma=Number("".concat(def.min,"e").concat(fracDigits)),sa=Number("".concat(def.step,"e").concat(fracDigits)),_va=Number("".concat(value,"e").concat(fracDigits))-ma;return Number("".concat(_va-_va%sa+ma,"e-").concat(fracDigits))}var va=value-def.min;return va-va%def.step+def.min}(def.max)!==def.max)throw new RangeError("max (".concat(def.max,") is not a multiple of the step (").concat(def.step,") plus the min (").concat(def.min,")"));if(definition.max=def.max,definition.min=def.min,definition.step=def.step,null==def.default)definition.default=def.max;else{if("number"!=typeof def.default||Number.isNaN(def.default)||!Number.isFinite(def.default))throw new TypeError("default must be a finite number");if(def.default<def.min)throw new RangeError("default (".concat(def.default,") is less than min (").concat(def.min,")"));if(def.default>def.max)throw new RangeError("default (".concat(def.default,") is greater than max (").concat(def.max,")"));definition.default=def.default}break;case Types.Toggle:definition.default=Boolean(def.default);break;case Types.Value:definition.default=def.default;break;default:throw new Error("unknown Setting type: ".concat(type))}"function"==typeof def.onInit&&(definition.onInit=Object.freeze(def.onInit)),"function"==typeof def.onChange&&(definition.onChange=Object.freeze(def.onChange)),_definitions.push(Object.freeze(definition))}function get(name){return _definitions.find((function(definition){return definition.name===name}))}function has(name){return _definitions.some((function(definition){return definition.name===name}))}return Object.preventExtensions(Object.create(null,{Types:{value:Types},init:{value:function(){load(),_definitions.forEach((function(def){if(Object.hasOwn(def,"onInit")){var data=createResultObject(def);def.onInit.call(data,data)}}))}},clear:{value:clear},create:{value:create},load:{value:load},reset:{value:function(name){if(0===arguments.length)clear(),load();else{if(null==name||!has(name))throw new Error('nonexistent setting "'.concat(name,'"'));var def=get(name);def.type!==Types.Header&&(settings[name]=def.default)}return save()}},save:{value:save},add:{value:add},addHeader:{value:function(name,desc){add(Types.Header,name,{desc:desc})}},addList:{value:function(){for(var _len20=arguments.length,args=new Array(_len20),_key20=0;_key20<_len20;_key20++)args[_key20]=arguments[_key20];add.apply(void 0,[Types.List].concat(args))}},addRange:{value:function(){for(var _len21=arguments.length,args=new Array(_len21),_key21=0;_key21<_len21;_key21++)args[_key21]=arguments[_key21];add.apply(void 0,[Types.Range].concat(args))}},addToggle:{value:function(){for(var _len22=arguments.length,args=new Array(_len22),_key22=0;_key22<_len22;_key22++)args[_key22]=arguments[_key22];add.apply(void 0,[Types.Toggle].concat(args))}},addValue:{value:function(){for(var _len23=arguments.length,args=new Array(_len23),_key23=0;_key23<_len23;_key23++)args[_key23]=arguments[_key23];add.apply(void 0,[Types.Value].concat(args))}},delete:{value:function(name){for(var i=0;i<_definitions.length;++i)if(_definitions[i].name===name){_definitions.splice(i,1);break}Object.hasOwn(settings,name)&&delete settings[name]}},forEach:{value:function(callback,thisArg){_definitions.forEach(callback,thisArg)}},get:{value:get},has:{value:has},isEmpty:{value:function(){return 0===_definitions.length}},getValue:{value:function(name){return settings[name]}},setValue:{value:function(name,value){if(!has(name))throw new Error("no such setting");settings[name]=value,save();var def=get(name);if(Object.hasOwn(def,"onChange")){var data=createResultObject(def);def.onChange.call(data,data)}return!0}}}))}(),Story=function(){var _ifId="",_id="",_name="",_passages=createPassageStore(),_inits=[],_scripts=[],_styles=[],_widgets=[],codePassageNames=["PassageDone","PassageFooter","PassageHeader","PassageReady","StoryAuthor","StoryBanner","StoryCaption","StoryDisplayTitle","StoryInit","StoryInterface","StoryMenu","StoryShare","StorySubtitle"],codeTagNames=["init","widget"];function createPassageStore(passages){var store=Object.create(null);return passages?Object.assign(store,passages):store}function generateName(rawName){if(null==rawName)throw new Error("story name must not be null or undefined");var name=decodeEntities(String(rawName)).trim();if(""===name)throw new Error("story name must not be empty or consist solely of whitespace");return name}function getId(){return _id}function getName(){return _name}function filter(predicate,thisArg){if("function"!=typeof predicate)throw new TypeError("Story.filter() predicate parameter must be a function");for(var results=[],i=0,keys=Object.keys(_passages);i<keys.length;++i){var passage=_passages[keys[i]];predicate.call(void 0===thisArg?this:thisArg,passage)&&results.push(passage)}return results}return Object.preventExtensions(Object.create(null,{init:{value:function(){function assertNoCodeTags(passage,desc){if(passage.tags.includesAny(codeTagNames))throw new Error("".concat(desc,' passage "').concat(passage.name,'" includes code tags; invalid: "').concat(passage.tags.filter((function(tag){return codeTagNames.includes(tag)})).sort().join('", "'),'"'))}function assertValidCodeTagUsage(passage){var found=passage.tags.filter((function(tag){return codeTagNames.includes(tag)})).sort();if(found.length>1)throw new Error('passage "'.concat(passage.name,'" includes multiple code tags; invalid: "').concat(found.join('", "'),'"'))}var $storydata=jQuery("tw-storydata"),startNode=$storydata.attr("startnode")||"";Config.passages.start=null,Config.debug=/\bdebug\b/.test($storydata.attr("options")),$storydata.children("style").each((function(i){_styles.push(new Passage("tw-user-style-".concat(i),this))})),$storydata.children("script").each((function(i){_scripts.push(new Passage("tw-user-script-".concat(i),this))})),$storydata.children('tw-passagedata:not([tags~="Twine.private"],[tags~="annotation"])').each((function(){var $this=jQuery(this),pid=$this.attr("pid")||"",passage=new Passage($this.attr("name"),this);pid===startNode&&""!==startNode?(Config.passages.start=passage.name,assertNoCodeTags(passage,"starting"),_passages[passage.name]=passage):codePassageNames.includes(passage.name)?(assertNoCodeTags(passage,"code"),_passages[passage.name]=passage):passage.tags.includes("init")?(assertValidCodeTagUsage(passage),_inits.push(passage)):passage.tags.includes("widget")?(assertValidCodeTagUsage(passage),_widgets.push(passage)):_passages[passage.name]=passage})),_ifId=$storydata.attr("ifid"),_name=generateName("丧尸研究专门所 "),_id=function(name){var id=createSlug(name);if(""===id)if(""!==_ifId)id=_ifId;else for(var i=0;i<name.length;++i){var _charAndPosAt2=charAndPosAt(name,i),char=_charAndPosAt2.char,start=_charAndPosAt2.start,end=_charAndPosAt2.end;id+=char.codePointAt(0).toString(16),i+=end-start}return id}(_name),Config.saves.id=_id,document.title=_name}},id:{get:getId},ifId:{get:function(){return _ifId}},name:{get:getName},add:{value:function(descriptor){if("Object"!==getTypeOf(descriptor))throw new TypeError("Story.add() descriptor parameter must be a generic object");if(Object.hasOwn(_passages,descriptor.name))return!1;var elem=document.createElement("div");elem.setAttribute("name",descriptor.name),elem.setAttribute("tags",descriptor.tags),elem.textContent=descriptor.text;var passage=new Passage(descriptor.name,elem);if(codePassageNames.includes(passage.name))throw new Error('Story.add() passage descriptor object "'.concat(passage.name,'" must not be a code passage'));if(passage.tags.includesAny(codeTagNames))throw new Error('Story.add() passage descriptor object "'.concat(passage.name,'" must not include code tags'));return _passages[passage.name]=passage,!0}},delete:{value:function(name){var type=_typeof(name);switch(type){case"number":case"string":var key=String(name);if(!Object.hasOwn(_passages,key))return!1;if(key===Config.passages.start||codePassageNames.includes(key))throw new Error('Story.delete() passage "'.concat(key,'" must not be a code passage'));if(_passages[key].tags.includesAny(codeTagNames))throw new Error('Story.delete() passage "'.concat(key,'" must not include code tags'));return delete _passages[key],!0;case"undefined":break;case"object":type=null===name?"null":"an object";break;default:type="a ".concat(type)}throw new TypeError("Story.delete() name parameter cannot be ".concat(type))}},filter:{value:filter},find:{value:function(predicate,thisArg){if("function"!=typeof predicate)throw new TypeError("Story.find() predicate parameter must be a function");for(var i=0,keys=Object.keys(_passages);i<keys.length;++i){var passage=_passages[keys[i]];if(predicate.call(void 0===thisArg?this:thisArg,passage))return passage}}},get:{value:function(name){var type=_typeof(name);switch(type){case"number":case"string":var key=String(name);return Object.hasOwn(_passages,key)?_passages[key]:new Passage(key||"(unknown)");case"undefined":break;case"object":type=null===name?"null":"an object";break;default:type="a ".concat(type)}throw new TypeError("Story.get() name parameter cannot be ".concat(type))}},getInits:{value:function(){return Object.freeze(Array.from(_inits))}},getNormals:{value:function(){return Object.freeze(createPassageStore(_passages))}},getScripts:{value:function(){return Object.freeze(Array.from(_scripts))}},getStyles:{value:function(){return Object.freeze(Array.from(_styles))}},getWidgets:{value:function(){return Object.freeze(Array.from(_widgets))}},has:{value:function(name){var type=_typeof(name);switch(type){case"number":case"string":return Object.hasOwn(_passages,String(name));case"undefined":break;case"object":type=null===name?"null":"an object";break;default:type="a ".concat(type)}throw new TypeError("Story.has name parameter cannot be ".concat(type))}},domId:{get:function(){return console.warn("[DEPRECATED] Story.domId is deprecated."),getId()}},title:{get:function(){return console.warn("[DEPRECATED] Story.title is deprecated."),getName()}},lookup:{value:function(key,value){var sortKey=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"name";return console.warn("[DEPRECATED] Story.lookup() is deprecated."),filter((function(passage){return"object"===_typeof(passage[key])&&null!==passage[key]?passage[key]instanceof Array&&passage[key].some((function(m){return sameValueZero(m,value)})):sameValueZero(passage[key],value)})).sort((function(a,b){return a[sortKey]==b[sortKey]?0:a[sortKey]<b[sortKey]?-1:1}))}},lookupWith:{value:function(predicate){var sortKey=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"name";if(console.warn("[DEPRECATED] Story.lookupWith() is deprecated."),"function"!=typeof predicate)throw new TypeError("Story.lookupWith() predicate parameter must be a function");return filter(predicate).sort((function(a,b){return a[sortKey]==b[sortKey]?0:a[sortKey]<b[sortKey]?-1:1}))}}}))}(),UI=function(){function assembleLinkList(passage,listEl){var list=listEl,debugState=Config.debug;Config.debug=!1;try{null==list&&(list=document.createElement("ul"));var frag=document.createDocumentFragment();new Wikifier(frag,Story.get(passage).processText().trim(),{cleanup:!1});var errors=Array.from(frag.querySelectorAll(".error")).map((function(errEl){return errEl.textContent.replace(errorPrologRegExp,"")}));if(errors.length>0)throw new Error(errors.join("; "));for(;frag.hasChildNodes();){var node=frag.firstChild;if(node.nodeType===Node.ELEMENT_NODE&&"A"===node.nodeName.toUpperCase()){var li=document.createElement("li");list.appendChild(li),li.appendChild(node)}else frag.removeChild(node)}}finally{Config.debug=debugState}return list}function buildRestart(){return Dialog.create(L10n.get("restartTitle"),"restart").append("<p>".concat(L10n.get("restartMesgPrompt"),'</p><ul class="buttons">')+'<li><button id="restart-ok">'.concat(L10n.get(["restartTextOk","textOk"]),"</button></li>")+'<li><button id="restart-cancel" class="ui-close">'.concat(L10n.get(["restartTextCancel","textCancel"]),"</button></li>")+"</ul>"),jQuery(Dialog.body()).find("#restart-ok").ariaClick({one:!0},(function(){jQuery(document).one(":dialogclosed",(function(){return Engine.restart()})),Dialog.close()})),!0}function buildSaves(){function createFileInput(id,callback){var input=document.createElement("input");return jQuery(input).attr({id:id,type:"file",tabindex:-1,"aria-hidden":!0}).css({display:"block",visibility:"hidden",position:"fixed",left:"-16128px",top:"-16128px",width:"1px",height:"1px"}).on("change",callback),input}function createActionItem(id,classNames,text,label,callback){var $btn=jQuery(document.createElement("button")).attr("id","saves-".concat(id)).text(text);return classNames&&$btn.addClass(classNames),callback?$btn.ariaClick({label:label},callback):$btn.ariaDisabled(!0),jQuery(document.createElement("li")).append($btn)}var browserEnabled=Save.browser.isEnabled();if(!browserEnabled&&!Has.fileAPI)return openAlert(L10n.get("warningNoSaves")),!1;Dialog.create(L10n.get("savesTitle"),"saves");var $dialogBody=jQuery(Dialog.body());if(browserEnabled){jQuery(document.createElement("h2")).text(L10n.get("savesHeaderBrowser")).appendTo($dialogBody),$dialogBody.append(function(){function createButton(id,classNames,kind,index,callback){var text;switch(id){case"delete":text=L10n.get("textDelete");break;case"load":text=L10n.get("textLoad");break;case"save":text=L10n.get("textSave");break;default:throw new Error('buildSaves unknown ID "'.concat(id,'"'))}var $btn=jQuery(document.createElement("button")).attr("id","saves-".concat(id,"-").concat(index)).addClass(id);return classNames&&$btn.addClass(classNames),callback?$btn.ariaClick({label:"".concat(text," ").concat(kind," ").concat(index+1)},(function(){try{callback(index)}catch(ex){openAlert("".concat(ex.message,".</p><p>").concat(L10n.get("textAborting"),"."))}})):$btn.ariaDisabled(!0),$btn}var $tbody=jQuery(document.createElement("tbody"));Save.browser.auto.entries().forEach((function(_ref13){var index=_ref13.index,info=_ref13.info,$tdSlot=jQuery(document.createElement("td")),$tdLoad=jQuery(document.createElement("td")),$tdDesc=jQuery(document.createElement("td")),$tdDele=jQuery(document.createElement("td"));jQuery(document.createElement("div")).text(info.desc).appendTo($tdDesc),jQuery(document.createElement("div")).addClass("details").addClass("datestamp").text("".concat(L10n.get("savesTextBrowserAuto")," ").concat(index+1,"  •  ")).append(info.date?"".concat(new Date(info.date).toLocaleString()):"<em>".concat(L10n.get("savesTextNoDate"),"</em>")).appendTo($tdDesc),$tdLoad.append(createButton("load","ui-close",L10n.get("savesTextBrowserAuto"),index,(function(index){jQuery(document).one(":dialogclosed",(function(){Save.browser.auto.load(index).then(Engine.show,(function(ex){return openAlert("".concat(ex.message.toUpperFirst(),".</p><p>").concat(L10n.get("textAborting"),"."))}))}))}))),$tdDele.append(createButton("delete",null,L10n.get("savesTextBrowserAuto"),index,(function(index){Save.browser.auto.delete(index),buildSaves()}))),jQuery(document.createElement("tr")).append($tdSlot).append($tdLoad).append($tdDesc).append($tdDele).appendTo($tbody)}));var slotAllowed="function"!=typeof Config.saves.isAllowed||Config.saves.isAllowed(Save.Type.Slot);return Save.browser.slot.entries().reduce((function(slots,entry){return slots[entry.index]=entry,slots}),Array.from({length:Config.saves.maxSlotSaves},(function(_,i){return{index:i}}))).forEach((function(_ref14){var index=_ref14.index,info=_ref14.info,$tdSlot=jQuery(document.createElement("td")),$tdLoad=jQuery(document.createElement("td")),$tdDesc=jQuery(document.createElement("td")),$tdDele=jQuery(document.createElement("td"));info?(jQuery(document.createElement("div")).text(info.desc).appendTo($tdDesc),jQuery(document.createElement("div")).addClass("details").addClass("datestamp").text("".concat(L10n.get("savesTextBrowserSlot")," ").concat(index+1,"  •  ")).append(info.date?"".concat(new Date(info.date).toLocaleString()):"<em>".concat(L10n.get("savesTextNoDate"),"</em>")).appendTo($tdDesc),$tdLoad.append(createButton("load","ui-close",L10n.get("savesTextBrowserSlot"),index,(function(index){jQuery(document).one(":dialogclosed",(function(){Save.browser.slot.load(index).then(Engine.show,(function(ex){return openAlert("".concat(ex.message.toUpperFirst(),".</p><p>").concat(L10n.get("textAborting"),"."))}))}))}))),$tdDele.append(createButton("delete",null,L10n.get("savesTextBrowserSlot"),index,(function(index){Save.browser.slot.delete(index),buildSaves()})))):($tdDesc.addClass("empty"),jQuery(document.createElement("div")).text(" ").appendTo($tdDesc),jQuery(document.createElement("div")).addClass("details").addClass("datestamp").text("".concat(L10n.get("savesTextBrowserSlot")," ").concat(index+1)).appendTo($tdDesc),$tdLoad.append(createButton("save",null,L10n.get("savesTextBrowserSlot"),index,index<Config.saves.maxSlotSaves&&slotAllowed?function(index){Save.browser.slot.save(index),buildSaves()}:null)),$tdDele.append(createButton("delete",null,L10n.get("savesTextBrowserSlot"),index))),jQuery(document.createElement("tr")).append($tdSlot).append($tdLoad).append($tdDesc).append($tdDele).appendTo($tbody)})),jQuery(document.createElement("table")).attr("id","saves-list").append($tbody)}());var $slotButtons=jQuery(document.createElement("ul")).addClass("buttons slots").appendTo($dialogBody);if(Has.fileAPI){var slotImportInput=createFileInput("saves-import-handler",(function(ev){Save.disk.import(ev).then(buildSaves,(function(ex){return openAlert("".concat(ex.message.toUpperFirst(),".</p><p>").concat(L10n.get("textAborting"),"."))}))}));$slotButtons.append(createActionItem("export",null,"".concat(L10n.get("textExport"),"…"),L10n.get("savesLabelBrowserExport"),(function(){return Save.disk.export("saves-export-".concat(Story.name))}))).append(createActionItem("import",null,"".concat(L10n.get("textImport"),"…"),L10n.get("savesLabelBrowserImport"),(function(){return slotImportInput.click()}))),jQuery(slotImportInput).appendTo($dialogBody)}$slotButtons.append(createActionItem("clear",null,L10n.get("textClear"),L10n.get("savesLabelBrowserClear"),Save.browser.size>0?function(){Save.browser.clear(),buildSaves()}:null))}if(Has.fileAPI){jQuery(document.createElement("h2")).text(L10n.get("savesHeaderDisk")).appendTo($dialogBody);var $diskButtons=jQuery(document.createElement("ul")).addClass("buttons").appendTo($dialogBody),diskLoadInput=createFileInput("saves-disk-load-handler",(function(ev){jQuery(document).one(":dialogclosed",(function(){Save.disk.load(ev).then(Engine.show,(function(ex){return openAlert("".concat(ex.message.toUpperFirst(),".</p><p>").concat(L10n.get("textAborting"),"."))}))})),Dialog.close()}));$diskButtons.append(createActionItem("disk-save",null,"".concat(L10n.get("textSave"),"…"),L10n.get("savesLabelDiskSave"),"function"!=typeof Config.saves.isAllowed||Config.saves.isAllowed(Save.Type.Disk)?function(){return Save.disk.save(Story.name)}:null)).append(createActionItem("disk-load",null,"".concat(L10n.get("textLoad"),"…"),L10n.get("savesLabelDiskLoad"),(function(){return diskLoadInput.click()}))),jQuery(diskLoadInput).appendTo($dialogBody)}return!0}function buildSettings(){Dialog.create(L10n.get("settingsTitle"),"settings");var $dialogBody=jQuery(Dialog.body());return Setting.forEach((function(control){switch(control.type){case Setting.Types.Header:var _name2=control.name,_id2=createSlug(_name2),$header=jQuery(document.createElement("div")),$heading=jQuery(document.createElement("h2"));return $header.attr("id","header-body-".concat(_id2)).append($heading).appendTo($dialogBody),$heading.attr("id","header-heading-".concat(_id2)).wikiWithOptions({cleanup:!1},_name2),void(control.desc&&jQuery(document.createElement("p")).attr("id","header-desc-".concat(_id2)).wikiWithOptions({cleanup:!1},control.desc).appendTo($header));case Setting.Types.Value:return}var $control,name=control.name,id=createSlug(name),$setting=jQuery(document.createElement("div")),$label=jQuery(document.createElement("label")),$controlBox=jQuery(document.createElement("div"));switch(jQuery(document.createElement("div")).append($label).append($controlBox).appendTo($setting),control.desc&&jQuery(document.createElement("p")).attr("id","setting-desc-".concat(id)).wikiWithOptions({cleanup:!1},control.desc).appendTo($setting),$label.attr({id:"setting-label-".concat(id),for:"setting-control-".concat(id)}).wikiWithOptions({cleanup:!1},control.label),null==Setting.getValue(name)&&Setting.setValue(name,control.default),control.type){case Setting.Types.List:$control=jQuery(document.createElement("select"));for(var i=0,iend=control.list.length;i<iend;++i)jQuery(document.createElement("option")).val(i).text(control.list[i]).appendTo($control);$control.val(control.list.indexOf(Setting.getValue(name))).attr("tabindex",0).on("change",(function(){Setting.setValue(name,control.list[Number(this.value)])}));break;case Setting.Types.Range:($control=jQuery(document.createElement("input"))).attr({type:"range",min:control.min,max:control.max,step:control.step,value:Setting.getValue(name),tabindex:0}).on("change input",(function(){Setting.setValue(name,Number(this.value))})).on("keypress",(function(ev){13===ev.which&&(ev.preventDefault(),triggerEvent("change",$control))}));break;case Setting.Types.Toggle:$control=jQuery(document.createElement("button")),Setting.getValue(name)?$control.addClass("enabled").text(L10n.get("textOn")):$control.text(L10n.get("textOff")),$control.ariaClick((function(){var status=Setting.getValue(name);status?jQuery(this).removeClass("enabled").text(L10n.get("textOff")):jQuery(this).addClass("enabled").text(L10n.get("textOn")),Setting.setValue(name,!status)}))}$control.attr("id","setting-control-".concat(id)).appendTo($controlBox),$setting.attr("id","setting-body-".concat(id)).appendTo($dialogBody)})),$dialogBody.append('<ul class="buttons">'+'<li><button id="settings-ok" class="ui-close">'.concat(L10n.get(["settingsTextOk","textOk"]),"</button></li>")+'<li><button id="settings-reset">'.concat(L10n.get("settingsTextReset"),"</button></li>")+"</ul>").find("#settings-reset").ariaClick({one:!0},(function(){jQuery(document).one(":dialogclosed",(function(){Setting.reset(),window.location.reload()})),Dialog.close()})),!0}function openAlert(message){for(var _Dialog$create$append,_len24=arguments.length,args=new Array(_len24>1?_len24-1:0),_key24=1;_key24<_len24;_key24++)args[_key24-1]=arguments[_key24];(_Dialog$create$append=Dialog.create(L10n.get("alertTitle"),"alert").append("<p>".concat(message,'</p><ul class="buttons">')+'<li><button id="alert-ok" class="ui-close">'.concat(L10n.get(["alertTextOk","textOk"]),"</button></li>")+"</ul>")).open.apply(_Dialog$create$append,args)}function buildJumpto(){console.warn("[DEPRECATED] UI.buildJumpto() is deprecated.");var list=document.createElement("ul");Dialog.create(L10n.get("jumptoTitle"),"jumpto list").append(list);for(var expired=State.expired.length,i=State.size-1;i>=0;--i)if(i!==State.activeIndex){var passage=Story.get(State.history[i].title);passage&&passage.tags.includes("bookmark")&&jQuery(document.createElement("li")).append(jQuery(document.createElement("a")).ariaClick({one:!0},function(index){return function(){return jQuery(document).one(":dialogclosed",(function(){return Engine.goTo(index)}))}}(i)).addClass("ui-close").text("".concat(L10n.get("textTurn")," ").concat(expired+i+1))).appendTo(list)}list.hasChildNodes()||jQuery(list).append("<li><a><em>".concat(L10n.get("jumptoMesgUnavailable"),"</em></a></li>"))}function buildShare(){console.warn("[DEPRECATED] UI.buildShare() is deprecated.");try{Dialog.create(L10n.get("shareTitle"),"share list").append(assembleLinkList("StoryShare"))}catch(ex){return console.error(ex),Alert.error("StoryShare",ex.message),!1}return!0}return Object.preventExtensions(Object.create(null,{assembleLinkList:{value:assembleLinkList},buildRestart:{value:buildRestart},buildSaves:{value:buildSaves},buildSettings:{value:buildSettings},update:{value:function(){triggerEvent(":uiupdate")}},alert:{value:openAlert},restart:{value:function(){buildRestart(),Dialog.open.apply(Dialog,arguments)}},saves:{value:function(){buildSaves(),Dialog.open.apply(Dialog,arguments)}},settings:{value:function(){buildSettings(),Dialog.open.apply(Dialog,arguments)}},buildAutoload:{value:function(){return console.warn("[DEPRECATED] UI.buildAutoload() is deprecated."),Dialog.create(L10n.get("autoloadTitle"),"autoload").append("<p>".concat(L10n.get("autoloadMesgPrompt"),'</p><ul class="buttons">')+'<li><button id="autoload-ok" class="ui-close">'.concat(L10n.get(["autoloadTextOk","textOk"]),"</button></li>")+'<li><button id="autoload-cancel" class="ui-close">'.concat(L10n.get(["autoloadTextCancel","textCancel"]),"</button></li>")+"</ul>"),jQuery(document).one("click.autoload",".ui-close",(function(ev){var isAutoloadOk="autoload-ok"===ev.target.id;jQuery(document).one(":dialogclosed",(function(){new Promise((function(resolve,reject){isAutoloadOk&&resolve(),reject()})).then((function(){return Save.browser.continue()})).catch((function(){Engine.play(Config.passages.start)}))}))})),!0}},buildJumpto:{value:buildJumpto},buildShare:{value:buildShare},jumpto:{value:function(){buildJumpto(),Dialog.open.apply(Dialog,arguments)}},share:{value:function(){buildShare(),Dialog.open.apply(Dialog,arguments)}}}))}(),UIBar=function(){var _$uiBar=null;function stow(noAnimation){var $story;_$uiBar&&!_$uiBar.hasClass("stowed")&&(noAnimation&&(($story=jQuery("#story")).addClass("no-transition"),_$uiBar.addClass("no-transition")),_$uiBar.addClass("stowed"),noAnimation&&setTimeout((function(){$story.removeClass("no-transition"),_$uiBar.removeClass("no-transition")}),Engine.DOM_DELAY));return UIBar}function update(){if(console.warn("[DEPRECATED] UIBar.update() is deprecated."),_$uiBar)return UI.update(),UIBar}return Object.preventExtensions(Object.create(null,{init:{value:function(){if(!document.getElementById("ui-bar")){var toggleLabel,backwardLabel,jumptoLabel,forwardLabel,$backward,$forward,$elems=(toggleLabel=L10n.get("uiBarLabelToggle"),backwardLabel=L10n.get("uiBarLabelBackward"),jumptoLabel=L10n.get("uiBarLabelJumpto"),forwardLabel=L10n.get("uiBarLabelForward"),jQuery(document.createDocumentFragment()).append('<div id="ui-bar" aria-live="polite"><div id="ui-bar-tray">'+'<button id="ui-bar-toggle" tabindex="0" title="'.concat(toggleLabel,'" aria-label="').concat(toggleLabel,'"></button>')+'<div id="ui-bar-history">'+'<button id="history-backward" tabindex="0" title="'.concat(backwardLabel,'" aria-label="').concat(backwardLabel,'"></button>')+'<button id="history-jumpto" tabindex="0" title="'.concat(jumptoLabel,'" aria-label="').concat(jumptoLabel,'"></button>')+'<button id="history-forward" tabindex="0" title="'.concat(forwardLabel,'" aria-label="').concat(forwardLabel,'"></button>')+'</div></div><div id="ui-bar-body"><header id="title" role="banner"><div id="story-banner"></div><h1 id="story-title"></h1><div id="story-subtitle"></div><div id="story-title-separator"></div><p id="story-author"></p></header><div id="story-caption"></div><nav id="menu" role="navigation"><ul id="menu-story"></ul><ul id="menu-core">'+'<li id="menu-item-continue"><a tabindex="0">'.concat(L10n.get("continueTitle"),"</a></li>")+'<li id="menu-item-saves"><a tabindex="0">'.concat(L10n.get("savesTitle"),"</a></li>")+'<li id="menu-item-settings"><a tabindex="0">'.concat(L10n.get("settingsTitle"),"</a></li>")+'<li id="menu-item-restart"><a tabindex="0">'.concat(L10n.get("restartTitle"),"</a></li>")+'<li id="menu-item-share"><a tabindex="0">'.concat(L10n.get("shareTitle"),"</a></li>")+"</ul></nav></div></div>"));_$uiBar=jQuery($elems.find("#ui-bar").get(0)),$elems.insertBefore("body>script#script-sugarcube"),jQuery(document).on(":historyupdate".concat(".ui-bar"),($backward=jQuery("#history-backward"),$forward=jQuery("#history-forward"),function(){$backward.ariaDisabled(State.length<2),$forward.ariaDisabled(State.length===State.size)}))}}},destroy:{value:function(){_$uiBar&&(_$uiBar.hide(),jQuery(document).off(".ui-bar"),jQuery(document.head).find("#style-ui-bar").remove(),_$uiBar.remove(),_$uiBar=null)}},hide:{value:function(){return _$uiBar&&_$uiBar.hide(),UIBar}},isHidden:{value:function(){return _$uiBar&&"none"===_$uiBar.css("display")}},isStowed:{value:function(){return _$uiBar&&_$uiBar.hasClass("stowed")}},show:{value:function(){return _$uiBar&&_$uiBar.show(),UIBar}},start:{value:function(){if(_$uiBar){("boolean"==typeof Config.ui.stowBarInitially?Config.ui.stowBarInitially:jQuery(window).width()<=Config.ui.stowBarInitially)&&stow(!0),jQuery("#ui-bar-toggle").ariaClick({label:L10n.get("uiBarLabelToggle")},(function(){return _$uiBar.toggleClass("stowed")})),Config.history.controls?(jQuery("#history-backward").ariaDisabled(State.length<2).ariaClick({label:L10n.get("uiBarLabelBackward")},(function(){return Engine.backward()})),Story.filter((function(passage){return passage.tags.includes("bookmark")})).length>0?jQuery("#history-jumpto").ariaClick({label:L10n.get("uiBarLabelJumpto")},(function(){return UI.jumpto()})):jQuery("#history-jumpto").remove(),jQuery("#history-forward").ariaDisabled(State.length===State.size).ariaClick({label:L10n.get("uiBarLabelForward")},(function(){return Engine.forward()}))):jQuery("#ui-bar-history").remove();var storyTitleHandler,addUiUpdateHandler=function(handler){return jQuery(document)[Config.ui.updateStoryElements?"on":"one"](":uiupdate".concat(".ui-bar"),handler)},addUpdaterOrRemove=function(selector,passageName){var $el=jQuery(selector);Story.has(passageName)?addUiUpdateHandler((function(){var frag=document.createDocumentFragment();new Wikifier(frag,Story.get(passageName).processText().trim()),$el.empty().append(frag)})):$el.remove()};if(storyTitleHandler=Story.has("StoryDisplayTitle")?function(){return setDisplayTitle(Story.get("StoryDisplayTitle").processText())}:function(){return setDisplayTitle(Story.name,!0)},addUiUpdateHandler(storyTitleHandler),addUpdaterOrRemove("#story-banner","StoryBanner"),addUpdaterOrRemove("#story-subtitle","StorySubtitle"),addUpdaterOrRemove("#story-author","StoryAuthor"),addUpdaterOrRemove("#story-caption","StoryCaption"),Story.has("StoryMenu")){var $menuStory=jQuery("#menu-story");jQuery(document).on(":uiupdate".concat(".ui-bar"),(function(){try{var frag=UI.assembleLinkList("StoryMenu",document.createDocumentFragment());$menuStory.empty().append(frag)}catch(ex){console.error(ex),Alert.error("StoryMenu",ex.message)}}))}else jQuery("#menu-story").remove();Save.browser.size>0?(jQuery("#menu-item-continue a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),Save.browser.continue().then((function(){jQuery(document).off(".menu-item-continue"),jQuery("#menu-item-continue").remove(),Engine.show()}),(function(ex){return UI.alert("".concat(ex.message.toUpperFirst(),".</p><p>").concat(L10n.get("textAborting"),"."))}))})).text(L10n.get("continueTitle")),jQuery(document).on(":passagestart.menu-item-continue",(function(){State.turns>1&&(jQuery(document).off(".menu-item-continue"),jQuery("#menu-item-continue").remove())}))):jQuery("#menu-item-continue").remove(),jQuery("#menu-item-saves a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildSaves(),Dialog.open()})).text(L10n.get("savesTitle")),Setting.isEmpty()?jQuery("#menu-item-settings").remove():jQuery("#menu-item-settings a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildSettings(),Dialog.open()})).text(L10n.get("settingsTitle")),jQuery("#menu-item-restart a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildRestart(),Dialog.open()})).text(L10n.get("restartTitle")),Story.has("StoryShare")?jQuery("#menu-item-share a").ariaClick({role:"button"},(function(ev){ev.preventDefault(),UI.buildShare(),Dialog.open()})).text(L10n.get("shareTitle")):jQuery("#menu-item-share").remove()}}},stow:{value:stow},unstow:{value:function(noAnimation){var $story;return _$uiBar&&_$uiBar.hasClass("stowed")&&(noAnimation&&(($story=jQuery("#story")).addClass("no-transition"),_$uiBar.addClass("no-transition")),_$uiBar.removeClass("stowed"),noAnimation&&setTimeout((function(){$story.removeClass("no-transition"),_$uiBar.removeClass("no-transition")}),Engine.DOM_DELAY)),UIBar}},setStoryElements:{value:update},update:{value:update}}))}(),DebugBar=function(){var STORAGE_KEY="debug.state",WATCH_LIST_DELAY=200,VAR_LIST_DELAY=500,variableRE=new RegExp("^".concat(Patterns.variable,"$")),numericKeyRE=/^\d+$/,watchList=[],varList=[],watchTimerId=null,listTimerId=null,stowed=!0,$debugBar=null,$watchBody=null,$varDataList=null,$turnSelect=null,$passageDataList=null;function debugBarStow(){disableWatchUpdates(),disableVarListUpdates(),$debugBar.css("right","-".concat($debugBar.outerWidth(),"px")),stowed=!0,updateSession()}function debugBarUnstow(){debugBarWatchIsEnabled()&&enableWatchUpdates(),enableVarListUpdates(),$debugBar.css("right",0),stowed=!1,updateSession()}function debugBarToggle(){stowed?debugBarUnstow():debugBarStow()}function debugBarWatchAdd(varName){variableRE.test(varName)&&(watchList.pushUnique(varName),watchList.sort(),updateWatchBody(),updateVarList(),updateSession())}function debugBarWatchAddAll(){Object.keys(State.variables).map((function(name){return watchList.pushUnique("$".concat(name))})),Object.keys(State.temporary).map((function(name){return watchList.pushUnique("_".concat(name))})),watchList.sort(),updateWatchBody(),updateVarList(),updateSession()}function debugBarWatchClear(){watchList.length=0,$watchBody.empty().append("<div>— ".concat(L10n.get("debugBarMesgNoWatches")," —</div>")),updateWatchBody(),updateVarList(),updateSession()}function debugBarWatchDelete(varName){watchList.deleteFirst(varName),$watchBody.find('tr[data-name="'.concat(varName,'"]')).remove(),updateWatchBody(),updateVarList(),updateSession()}function debugBarWatchDisable(){disableWatchUpdates(),disableWatch(),updateSession()}function debugBarWatchEnable(){enableWatchUpdates(),enableWatch(),updateSession()}function debugBarWatchIsEnabled(){return!$watchBody.attr("hidden")}function debugBarWatchToggle(){$watchBody.attr("hidden")?debugBarWatchEnable():debugBarWatchDisable()}function disableWatch(){$watchBody.attr({"aria-hidden":!0,hidden:"hidden"})}function disableWatchUpdates(){null!==watchTimerId&&(clearInterval(watchTimerId),watchTimerId=null)}function enableWatch(){$watchBody.removeAttr("aria-hidden hidden")}function enableWatchUpdates(){null===watchTimerId&&(watchTimerId=setInterval((function(){return updateWatchBody()}),WATCH_LIST_DELAY))}function disableVarListUpdates(){null!==listTimerId&&(clearInterval(listTimerId),listTimerId=null)}function enableVarListUpdates(){null===listTimerId&&(listTimerId=setInterval((function(){return updateVarList()}),VAR_LIST_DELAY))}function clearSession(){session.delete(STORAGE_KEY)}function updateSession(){session.set(STORAGE_KEY,{stowed:stowed,watchList:watchList,watchEnabled:debugBarWatchIsEnabled(),viewsEnabled:DebugView.isEnabled()})}function updateWatchBody(){if(0!==watchList.length){var $tbody,$rowMap=new Map,$table=jQuery($watchBody.children("table"));$table.length>0?($tbody=jQuery($table.children("tbody"))).children("tr").each((function(_,el){return $rowMap.set(el.getAttribute("data-name"),jQuery(el))})):($table=jQuery(document.createElement("table")),$tbody=jQuery(document.createElement("tbody")),$table.append($tbody),$watchBody.empty().append($table));var delLabel=L10n.get("debugBarLabelWatchDelete"),cursor=$rowMap.size>0?$tbody.children("tr").get(0):null;watchList.forEach((function(varName){var varKey=varName.slice(1),value=toWatchString(("$"===varName[0]?State.variables:State.temporary)[varKey]),$row=$rowMap.get(varName);if($row){var $code=$row.children().children("code");value!==$code.text()&&$code.text(value)}else $row=function(varName,value){var $row=jQuery(document.createElement("tr")),$delBtn=jQuery(document.createElement("button")),$code=jQuery(document.createElement("code"));return $row.attr("data-name",varName),$delBtn.addClass("watch-delete").ariaClick({one:!0,label:delLabel},(function(){return debugBarWatchDelete(varName)})),$code.text(value),jQuery(document.createElement("td")).append($delBtn).appendTo($row),jQuery(document.createElement("td")).text(varName).appendTo($row),jQuery(document.createElement("td")).append($code).appendTo($row),$row}(varName,value),cursor?$row.insertAfter(cursor):$row.appendTo($tbody);cursor=$row.get(0)}))}}function updateVarList(){var names=[].concat(Object.keys(State.variables).map((function(name){return"$".concat(name)})),Object.keys(State.temporary).map((function(name){return"_".concat(name)})));if(0===names.length)return varList.length=0,void $varDataList.empty();if(names.sort().deleteAll(watchList),names.length!==varList.length||!names.every((function(m,i){return m===varList[i]}))){varList=names;var options=document.createDocumentFragment();varList.forEach((function(name){jQuery(document.createElement("option")).val(name).appendTo(options)})),$varDataList.empty().append(options)}}function updateTurnSelect(){for(var histLen=State.size,expLen=State.expired.length,options=document.createDocumentFragment(),i=0;i<histLen;++i)jQuery(document.createElement("option")).val(i).text("".concat(expLen+i+1,". ").concat(State.history[i].title)).appendTo(options);$turnSelect.empty().ariaDisabled(histLen<2).append(options).val(State.activeIndex)}function updatePassageList(){var passages=Object.keys(Story.getNormals()).sort(),options=document.createDocumentFragment();passages.forEach((function(name){jQuery(document.createElement("option")).val(name).appendTo(options)})),$passageDataList.empty().append(options)}function toWatchString(O){if(null===O)return"null";switch(_typeof(O)){case"bigint":case"boolean":case"number":case"symbol":case"undefined":return String(O);case"string":return JSON.stringify(O);case"function":return"Function"}var objType=getToStringTag(O);if("Date"===objType)return"Date {".concat(O.toLocaleString(),"}");if("RegExp"===objType)return"RegExp ".concat(O.toString());var result=[];if(O instanceof Array||O instanceof Set){for(var list=O instanceof Array?O:Array.from(O),i=0,len=list.length;i<len;++i)result.push(Object.hasOwn(list,i)?toWatchString(list[i]):"<empty>");return Object.keys(list).filter((function(key){return!numericKeyRE.test(key)})).forEach((function(key){return result.push("".concat(toWatchString(key),": ").concat(toWatchString(list[key])))})),"".concat(objType,"(").concat(list.length,") [").concat(result.join(", "),"]")}return O instanceof Map?(O.forEach((function(val,key){return result.push("".concat(toWatchString(key)," → ").concat(toWatchString(val)))})),"".concat(objType,"(").concat(O.size,") {").concat(result.join(", "),"}")):(Object.keys(O).forEach((function(key){return result.push("".concat(toWatchString(key),": ").concat(toWatchString(O[key])))})),"".concat(objType," {").concat(result.join(", "),"}"))}return Object.preventExtensions(Object.create(null,{init:{value:function(){if(Config.debug){var barToggleLabel=L10n.get("debugBarLabelToggle"),watchAddLabel=L10n.get("debugBarLabelWatchAdd"),watchAllLabel=L10n.get("debugBarLabelWatchAll"),watchClearLabel=L10n.get("debugBarLabelWatchClear"),watchToggleLabel=L10n.get("debugBarLabelWatchToggle"),viewsToggleLabel=L10n.get("debugBarLabelViewsToggle"),passagePlayLabel=L10n.get("debugBarLabelPassagePlay");jQuery(document.createDocumentFragment()).append('<div id="debug-bar"><div id="debug-bar-watch">'+"<div>— ".concat(L10n.get("debugBarMesgNoWatches")," —</div>")+"</div><div>"+'<label id="debug-bar-watch-label" for="debug-bar-watch-input">'.concat(L10n.get("debugBarTextWatch"),"</label>")+'<input id="debug-bar-watch-input" name="debug-bar-watch-input" type="text" placeholder="'.concat(L10n.get("debugBarLabelWatchPlaceholder"),'" list="debug-bar-var-list" tabindex="0">')+'<datalist id="debug-bar-var-list" aria-hidden="true" hidden="hidden"></datalist>'+'<button id="debug-bar-watch-add" tabindex="0" title="'.concat(watchAddLabel,'" aria-label="').concat(watchAddLabel,'"></button>')+'<button id="debug-bar-watch-all" tabindex="0" title="'.concat(watchAllLabel,'" aria-label="').concat(watchAllLabel,'"></button>')+'<button id="debug-bar-watch-clear" tabindex="0" title="'.concat(watchClearLabel,'" aria-label="').concat(watchClearLabel,'"></button>')+"</div><div>"+'<label id="debug-bar-turn-label" for="debug-bar-turn-select">'.concat(L10n.get("textTurn"),"</label>")+'<select id="debug-bar-turn-select" tabindex="0"></select></div><div>'+'<label id="debug-bar-passage-label" for="debug-bar-passage-input">'.concat(L10n.get("debugBarTextPassage"),"</label>")+'<input id="debug-bar-passage-input" name="debug-bar-passage-input" type="text" placeholder="'.concat(L10n.get("debugBarLabelPassagePlaceholder"),'" list="debug-bar-passage-list" tabindex="0">')+'<datalist id="debug-bar-passage-list" aria-hidden="true" hidden="hidden"></datalist>'+'<button id="debug-bar-passage-play" tabindex="0" title="'.concat(passagePlayLabel,'" aria-label="').concat(passagePlayLabel,'"></button>')+"</div><div>"+'<button id="debug-bar-views-toggle" tabindex="0" title="'.concat(viewsToggleLabel,'" aria-label="').concat(viewsToggleLabel,'">').concat(L10n.get("debugBarTextViews"),"</button>")+'<button id="debug-bar-watch-toggle" tabindex="0" title="'.concat(watchToggleLabel,'" aria-label="').concat(watchToggleLabel,'">').concat(L10n.get("debugBarTextWatch"),"</button>")+"</div>"+'<button id="debug-bar-toggle" tabindex="0" title="'.concat(barToggleLabel,'" aria-label="').concat(barToggleLabel,'"></button>')+'</div><div id="debug-bar-hint"></div>').appendTo("body"),$debugBar=jQuery("#debug-bar"),$watchBody=jQuery($debugBar.find("#debug-bar-watch").get(0)),$varDataList=jQuery($debugBar.find("#debug-bar-var-list").get(0)),$turnSelect=jQuery($debugBar.find("#debug-bar-turn-select").get(0)),$passageDataList=jQuery($debugBar.find("#debug-bar-passage-list").get(0));var $watchInput=jQuery($debugBar.find("#debug-bar-watch-input").get(0)),$watchAdd=jQuery($debugBar.find("#debug-bar-watch-add").get(0)),$watchAll=jQuery($debugBar.find("#debug-bar-watch-all").get(0)),$watchClear=jQuery($debugBar.find("#debug-bar-watch-clear").get(0)),$passageInput=jQuery($debugBar.find("#debug-bar-passage-input").get(0)),$passagePlay=jQuery($debugBar.find("#debug-bar-passage-play").get(0)),$viewsToggle=jQuery($debugBar.find("#debug-bar-views-toggle").get(0)),$watchToggle=jQuery($debugBar.find("#debug-bar-watch-toggle").get(0)),$barToggle=jQuery($debugBar.find("#debug-bar-toggle").get(0));$watchInput.on("sc:debug-watch-add",(function(){debugBarWatchAdd(this.value.trim()),this.value=""})).on("keypress",(function(ev){13===ev.which&&(ev.preventDefault(),triggerEvent("sc:debug-watch-add",$watchInput))})),$watchAdd.ariaClick((function(){return triggerEvent("sc:debug-watch-add",$watchInput)})),$watchAll.ariaClick(debugBarWatchAddAll),$watchClear.ariaClick(debugBarWatchClear),$turnSelect.on("change",(function(){Engine.goTo(Number(this.value))})),$passageInput.on("sc:debug-passage-play",(function(){Engine.play(this.value.trim()),this.value=""})).on("keypress",(function(ev){13===ev.which&&(ev.preventDefault(),triggerEvent("sc:debug-passage-play",$passageInput))})).on("focus",updatePassageList),$passagePlay.ariaClick((function(){return triggerEvent("sc:debug-passage-play",$passageInput)})),$viewsToggle.ariaClick((function(){DebugView.toggle(),updateSession()})),$watchToggle.ariaClick(debugBarWatchToggle),$barToggle.ariaClick(debugBarToggle),jQuery(document).on(":passageend.debug-bar",(function(){updateWatchBody(),updateVarList()})).on(":historyupdate.debug-bar",updateTurnSelect).on(":enginerestart.debug-bar",clearSession)}else jQuery(document.head).find('[id|="style-ui-debug"]').remove()}},isStowed:{value:function(){return stowed}},start:{value:function(){Config.debug&&(function(){if(!session.has(STORAGE_KEY))return!1;var debugState=session.get(STORAGE_KEY);watchList.push.apply(watchList,_toConsumableArray(debugState.watchList)),debugState.watchEnabled?(stowed?disableWatchUpdates():enableWatchUpdates(),enableWatch()):(disableWatchUpdates(),disableWatch());debugState.viewsEnabled?DebugView.enable():DebugView.disable();(stowed=debugState.stowed)?(disableVarListUpdates(),debugBarStow()):(enableVarListUpdates(),debugBarUnstow());return!0}()||(debugBarStow(),DebugView.enable(),enableWatchUpdates(),enableWatch()),updateVarList(),updateTurnSelect())}},stow:{value:debugBarStow},toggle:{value:debugBarToggle},unstow:{value:debugBarUnstow},watch:{value:Object.preventExtensions(Object.create(null,{add:{value:debugBarWatchAdd},all:{value:debugBarWatchAddAll},clear:{value:debugBarWatchClear},delete:{value:debugBarWatchDelete},disable:{value:debugBarWatchDisable},enable:{value:debugBarWatchEnable},isEnabled:{value:debugBarWatchIsEnabled},toggle:{value:debugBarWatchToggle}}))}}))}(),LoadScreen=function(){var _locks=new Set,_autoId=0;function loadScreenHide(){jQuery(document.documentElement).removeAttr("data-init")}function loadScreenShow(){jQuery(document.documentElement).attr("data-init","loading")}return Object.preventExtensions(Object.create(null,{init:{value:function(){jQuery(document).on("readystatechange.SugarCube",(function(){_locks.size>0||("complete"===document.readyState?"loading"===jQuery(document.documentElement).attr("data-init")&&(Config.loadDelay>0?setTimeout((function(){0===_locks.size&&loadScreenHide()}),Math.max(Engine.DOM_DELAY,Config.loadDelay)):loadScreenHide()):loadScreenShow())}))}},clear:{value:function(){jQuery(document).off("readystatechange.SugarCube"),_locks.clear(),loadScreenHide()}},hide:{value:loadScreenHide},show:{value:loadScreenShow},lock:{value:function(){return++_autoId,_locks.add(_autoId),loadScreenShow(),_autoId}},unlock:{value:function(id){if(null==id)throw new Error("LoadScreen.unlock called with a null or undefined ID");_locks.has(id)&&_locks.delete(id),0===_locks.size&&triggerEvent("readystatechange")}},size:{get:function(){return _locks.size}}}))}(),Util=Object.preventExtensions(Object.create(null,{charAndPosAt:{value:function(){return console.warn("[DEPRECATED] Util.charAndPosAt() is deprecated."),charAndPosAt.apply(void 0,arguments)}},escape:{value:function(){return console.warn("[DEPRECATED] Util.escape() is deprecated."),encodeEntities.apply(void 0,arguments)}},escapeMarkup:{value:function(){return console.warn("[DEPRECATED] Util.escapeMarkup() is deprecated."),encodeMarkup.apply(void 0,arguments)}},fromCssProperty:{value:function(){return console.warn("[DEPRECATED] Util.fromCssProperty() is deprecated."),cssPropToDOMProp.apply(void 0,arguments)}},fromCssTime:{value:function(){return console.warn("[DEPRECATED] Util.fromCssTime() is deprecated."),cssTimeToMS.apply(void 0,arguments)}},getType:{value:function(){return console.warn("[DEPRECATED] Util.getType() is deprecated."),getTypeOf.apply(void 0,arguments)}},hasMediaQuery:{value:function(){return console.warn("[DEPRECATED] Util.hasMediaQuery() is deprecated."),hasMediaQuery.apply(void 0,arguments)}},newExceptionFrom:{value:function(){return console.warn("[DEPRECATED] Util.newExceptionFrom() is deprecated."),exceptionFrom.apply(void 0,arguments)}},now:{value:function(){return console.warn("[DEPRECATED] Util.now() is deprecated."),now.apply(void 0,arguments)}},parseUrl:{value:function(){return console.warn("[DEPRECATED] Util.parseUrl() is deprecated."),parseURL.apply(void 0,arguments)}},sameValueZero:{value:function(){return console.warn("[DEPRECATED] Util.sameValueZero() is deprecated."),sameValueZero.apply(void 0,arguments)}},sanitizeFilename:{value:function(){return console.warn("[DEPRECATED] Util.sanitizeFilename() is deprecated."),createFilename.apply(void 0,arguments)}},scrubEventKey:{value:function(){return console.warn("[DEPRECATED] Util.scrubEventKey() is deprecated."),scrubEventKey.apply(void 0,arguments)}},slugify:{value:function(){return console.warn("[DEPRECATED] Util.slugify() is deprecated."),createSlug.apply(void 0,arguments)}},toCssTime:{value:function(){return console.warn("[DEPRECATED] Util.toCssTime() is deprecated."),msToCSSTime.apply(void 0,arguments)}},toEnum:{value:function(){return console.warn("[DEPRECATED] Util.toEnum() is deprecated."),enumFrom.apply(void 0,arguments)}},toStringTag:{value:function(){return console.warn("[DEPRECATED] Util.toStringTag() is deprecated."),getToStringTag.apply(void 0,arguments)}},unescape:{value:function(){return console.warn("[DEPRECATED] Util.unescape() is deprecated."),decodeEntities.apply(void 0,arguments)}}})),version=(semVerRE=/^[Vv]?(\d+)(?:\.(\d+)(?:\.(\d+)(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)?)?$/,Object.preventExtensions(Object.create(null,{name:{value:"SugarCube"},major:{value:2},minor:{value:37},patch:{value:3},prerelease:{value:""},build:{value:10338},date:{value:new Date("2024-07-27T00:45:20.724Z")},isOk:{value:function(semver){if("string"!=typeof semver)throw new Error("version.isOk semver parameter must be a string (received: ".concat(_typeof(semver),")"));var trimmed=semver.trim();if(""===trimmed)throw new Error("version.isOk semver parameter must not be empty");var match=semVerRE.exec(trimmed);if(!match)throw new Error("version.isOk semver parameter is invalid (format: [v]MAJOR[.MINOR[.PATCH[-PRERELEASE][+BUILD]]]; received: ".concat(trimmed));var major=Number(match[1]),minor=Number(match[2])||0,patch=Number(match[3])||0;return major===this.major&&(minor<this.minor||minor===this.minor&&patch<=this.patch)}},long:{value:function(){return"".concat(this.name," v").concat(this.toString()," (").concat(this.date.toUTCString(),")")}},short:{value:function(){var prerelease=this.prerelease?"-".concat(this.prerelease):"";return"".concat(this.name," (v").concat(this.major,".").concat(this.minor,".").concat(this.patch).concat(prerelease,")")}},toString:{value:function(){var prerelease=this.prerelease?"-".concat(this.prerelease):"";return"".concat(this.major,".").concat(this.minor,".").concat(this.patch).concat(prerelease,"+").concat(this.build)}},title:{value:"SugarCube"}}))),semVerRE,TempState={},session=null,settings=Setting.create(),setup={},storage=null,macros={},postdisplay={},postrender={},predisplay={},prehistory={},prerender={};Object.defineProperty(window,"SugarCube",{value:Object.seal(Object.assign(Object.create(null),{Browser:Browser,Config:Config,Dialog:Dialog,Engine:Engine,Fullscreen:Fullscreen,Has:Has,L10n:L10n,Macro:Macro,Passage:Passage,Save:Save,Scripting:Scripting,Setting:Setting,SimpleAudio:SimpleAudio,State:State,Story:Story,UI:UI,UIBar:UIBar,DebugBar:DebugBar,Util:Util,Visibility:Visibility,Wikifier:Wikifier,session:session,settings:settings,setup:setup,storage:storage,version:version}))}),jQuery((function(){var lockId=LoadScreen.lock();LoadScreen.init(),document.normalize&&document.normalize(),new Promise((function(resolve){Story.init();try{SugarCube.storage=storage=SimpleStore.create(Story.id,!0),SugarCube.session=session=SimpleStore.create(Story.id,!1)}catch(ex){throw new Error(L10n.get("warningNoStorage"))}Dialog.init(),UIBar.init(),Engine.init(),Outliner.init(),Engine.runUserScripts(),L10n.init(),session.has("rcWarn")||"cookie"!==storage.name||(session.set("rcWarn",1),window.alert(L10n.get("warningNoWebStorage"))),Save.init(),Setting.init(),Macro.init(),DebugBar.init();var $window=jQuery(window),vpReadyId=setInterval((function(){$window.width()&&LoadScreen.size<=1&&(clearInterval(vpReadyId),resolve())}),Engine.DOM_DELAY)})).then((function(){Engine.runUserInit(),UIBar.start(),Engine.start(),DebugBar.start(),triggerEvent(":storyready"),setTimeout((function(){return LoadScreen.unlock(lockId)}),2*Engine.DOM_DELAY)})).catch((function(ex){return console.error(ex),LoadScreen.clear(),Alert.fatal(null,ex.message,ex)}))}))})(window,window.document,jQuery);}
	</script>
</body>
</html>
